code wiki / _hdl_build / nx_doc_mainscan.nx
nx_doc_mainscan.nx
buildroot/runtime/_hdl_build/nx_doc_mainscan.nx
about
nx_doc_mainscan.nx -- DOCTOR diagnosis for a NEW failure class discovered live this session: nxasm exits rc=102
"UNDEFINED label: main" when a LIBRARY module (functions only, no `func main`) is built as a standalone
executable (the linker has no entry point). Seen real: `nx_sov_build_run nx_tls13` -> rc=102, because nx_tls13.nx
is the TLS-1.3 record-layer LIBRARY (consumed by nx_pub_tls_serve / the gates, which DO build green). This is a
DIFFERENT class from compiler-level CC-UNDEFFN ("call to undefined function: <name>"): it is an ASSEMBLER-level
missing entry-point. READ-ONLY BY CONSTRUCTION: it does NOT fabricate a `main` (that would be a fake program and
could mask a genuinely missing entry point) -- it DIAGNOSES "this source has no main; if it is a library, build it
through its consumer/gate, not standalone." Reuses kw_eq + dhl_isident/dhl_name_at from nx_doc_kwscan. ORIGINAL
dependencies 2 imports · 3 importers
imports: nx_syscalls.nxnx_doc_kwscan.nx
imported by: nx_doc_autoheal_apply.nxnx_doc_build_resolve.nxnx_doc_mainscan_gate.nx
structs
| none |
consts
| none |
functions
| 13 | func ms_substr(hay: *u8, hlen: i64, needle: *u8, nlen: i64) -> i64 called by 1: ms_is_library_build_error |
| 25 | func ms_has_main(src: *u8, n: i64) -> i64 |
| 55 | func ms_is_library_build_error(diag: *u8, dlen: i64, src: *u8, n: i64) -> i64 |