code wiki / _hdl_build / nx_byte_diff.nx
nx_byte_diff.nx
buildroot/runtime/_hdl_build/nx_byte_diff.nx
about
nx_byte_diff.nx -- item-1 of the PM plan (x86 toolchain byte-exact differential vs gcc): compare the
.text (machine code) of two ELFs built from the SAME .s -- one by sovereign nxasm_x86, one by gcc/gas.
Both consume identical assembly, so a byte-exact .text proves we replicate gas's encoding exactly =
strong triangulated S-class evidence; a mismatch localizes the first differing byte to inspect. Reuses
the sovereign ELF reader. license_tier: ORIGINAL
dependencies 2 imports · 1 importers
imports: nx_elf_read.nxnx_syscalls.nx
imported by: nx_byte_diff_begin.nx
structs
| 10 | struct BdText { found: i64, off: i64, size: i64 } |
| 11 | struct BdCmp { okA: i64, okB: i64, sizeA: i64, sizeB: i64, common_match: i64, first_mismatch: i64, exact: i64 } |
consts
| none |
functions
| 13 | func bd_streq(a: *u8, b: *u8) -> i64 called by 1: bd_find_text |
| 21 | func bd_find_text(buf: *u8, h: *NxElfHeader) -> *BdText |
| 39 | func bd_compare(bufA: *u8, lenA: i64, bufB: *u8, lenB: i64) -> *BdCmp |