code wiki / (root) / nx_strip.nx

nx_strip.nx

buildroot/runtime/nx_strip.nx

3809 B109 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_strip.nx -- sovereign `strip` (remove debug info from ELF). Walks the section headers, identifies sections to drop (.debug_*, .symtab, .strtab if separable), and emits a fresh ELF with the remaining sections. Caller supplies an output buffer; we return the new total byte count. Useful for shipping production binaries: debug sections often dwarf the actual code (especially DWARF DIE forests). Stripping can cut binary size 3-10x on debug-heavy builds. Pairs with nx_elf_read (parse) + nx_objdump (verify).

dependencies 2 imports · 0 importers

syscalls.nx nx_elf_read.nx nx_strip.nx

imports: syscalls.nxnx_elf_read.nx

imported by: nobody (leaf or entry point)

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

main nx_strip_default_keep

structs

none

consts

none

functions

27func nx_strip_default_keep(name: *u8) -> i64
62func nx_strip_estimate(buf: *u8, len: i64) -> i64
85func main() -> i64