code wiki / (root) / nx_objdump.nx

nx_objdump.nx

buildroot/runtime/nx_objdump.nx

9387 B274 linesdepth 4pulls 4 transitivereach 3 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_objdump.nx -- sovereign objdump (read + dump ELF metadata). Closes the off-C tooling triangle: elf_writer / nxasm / nxld PRODUCE ELF nx_elf_read READ ELF nx_objdump INSPECT ELF (this module) The third-party `objdump` becomes optional. Every byte we write can be inspected by tools we own. Subset of objdump features shipped here: nx_objdump_elf_header(buf, len, fd) prints: magic, class, byte-order, type, machine, entry, phoff, shoff, ehsize, phnum, shnum nx_objdump_section_headers(buf, len, fd) prints: idx, name, type, flags, addr, offset, size (one line per section) nx_objdump_symbols(buf, len, sym_idx, fd) prints: idx, value, size, type, bind, name (one line per symbol) Output format roughly matches `objdump -h` / `objdump -t` so users familiar with binutils have minimal context-switch cost.

dependencies 2 imports · 3 importers

syscalls.nx nx_elf_read.nx nx_objdump.nx nx_readelf.nx nx_smoke_objdump.nx nx_toolchain.nx

imports: syscalls.nxnx_elf_read.nx

imported by: nx_readelf.nxnx_smoke_objdump.nxnx_toolchain.nx

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

main sys_pipe2 nx_objdump_puthex64 sys_read

structs

none

consts

none

functions

40func nx_objdump_puts(fd: i64, s: *u8) -> i64
47func nx_objdump_putln(fd: i64, s: *u8) -> i64
54func nx_objdump_puthex64(fd: i64, v: i64) -> i64
68func nx_objdump_putdec(fd: i64, v: i64) -> i64
94func nx_objdump_elf_header(buf: *u8, len: i64, fd: i64) -> i64
139func nx_objdump_section_headers(buf: *u8, len: i64, fd: i64) -> i64
201func nx_objdump_symbols(buf: *u8, len: i64, sym_idx: i64, fd: i64) -> i64
251func main() -> i64