code wiki / (root) / nx_dwline_e2e_gate.nx

nx_dwline_e2e_gate.nx

buildroot/runtime/nx_dwline_e2e_gate.nx

16721 B351 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic dwline
docsdependenciesstructsconstsfunctions

about

nx_dwline_e2e_gate.nx -- COMPILER -> ASSEMBLER -> ELF -> DECODER, on the real toolchain. nx_dwline_roundtrip_gate proves our DWARF encoder and decoder agree ON A BUFFER. That is a real two-system check but it does NOT prove the shipped pipeline produces such a buffer. This gate drives the actual sovereign toolchain -- nx_cc_sovereign.elf -g, then nxasm_x86_main.elf -- reads the ELF that falls out, and resolves an address through nx_addr2line_lib. GROUND TRUTH IS THE SOURCE FILE, NOT OUR OWN OUTPUT. runtime/nx_probe_dbgtiny.nx defines dbgtiny_a on line 5 and main on line 9. GNU readelf independently resolved 0x400096 -> line 5 and 0x4000AD -> line 9 on this exact probe, so asserting "e_entry resolves to line 9" is checked against an external oracle and against the source, not against a number we made up. THE LOAD-BEARING TOOTH IS THE NEGATIVE CONTROL. Compiling the SAME probe WITHOUT -g must produce an ELF with NO .debug_line at all. Without it, a pipeline that emitted debug info unconditionally would pass every positive tooth here -- and it would silently regress the published "168 B minimal static binary" measurement, which is a MEASURED exceed on /compare/lang. DDR-002 named that tradeoff as its load-bearing risk; this is the check that holds it. license_tier: ORIGINAL expect_exit: 0

dependencies 5 imports · 0 importers

syscalls.nx nx_elf_read.nx nx_addr2line_lib.nx nx_deploy_lib.nx nx_gate_verdict.nx nx_dwline_e2e_gate.nx

imports: syscalls.nxnx_elf_read.nxnx_addr2line_lib.nxnx_deploy_lib.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ e2e_run_out gv_check gv_puts ↻ e2e_read dep_run sys_fork sys_mmap ↻ sys_execve sys_exit ↻ sys_wait4 e2e_debug_line nx_elf_parse_header nx_elf_get_u16_le nx_elf_get_u64_le nx_elf_get_u32_le nx_elf_read_shdr nx_elf_get_u32_le ↻ nx_elf_get_u64_le ↻ nx_elf_strtab_at e2e_streq

structs

none

consts

26const E2E_CAP: i64 = 4194304
27const E2E_CC: *u8 = "_offc/nx_cc_sovereign.elf" as *u8
28const E2E_ASM: *u8 = "_offc/nxasm_x86_main.elf" as *u8
29const E2E_SRC: *u8 = "runtime/nx_probe_dbgtiny.nx" as *u8
30const E2E_SG: *u8 = "/tmp/nx_dwe2e_g.s" as *u8
31const E2E_EG: *u8 = "/tmp/nx_dwe2e_g.elf" as *u8
32const E2E_SN: *u8 = "/tmp/nx_dwe2e_nog.s" as *u8
33const E2E_EN: *u8 = "/tmp/nx_dwe2e_nog.elf" as *u8

functions

35func e2e_streq(a: *u8, b: *u8) -> i64
called by 1: e2e_debug_line
53func e2e_run_out(elf: *u8, args: *i64, nargs: i64, outfile: *u8) -> i64
called by 1: main
75func e2e_contains(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main
90func e2e_hex(dst: *u8, v: i64) -> i64
called by 1: main
110func e2e_read(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main
124func e2e_debug_line(buf: *u8, len: i64, box: *i64) -> i64
142func main() -> i64