nx_objdump.nx
buildroot/runtime/nx_objdump.nx
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
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
structs
| none |
consts
| none |
functions
| 40 | func nx_objdump_puts(fd: i64, s: *u8) -> i64 |
| 47 | func nx_objdump_putln(fd: i64, s: *u8) -> i64 called by 3: nx_objdump_elf_headernx_objdump_section_headersnx_objdump_symbols calls 1: nx_objdump_puts |
| 54 | func nx_objdump_puthex64(fd: i64, v: i64) -> i64 |
| 68 | func nx_objdump_putdec(fd: i64, v: i64) -> i64 |
| 94 | func nx_objdump_elf_header(buf: *u8, len: i64, fd: i64) -> i64 |
| 139 | func nx_objdump_section_headers(buf: *u8, len: i64, fd: i64) -> i64 |
| 201 | func nx_objdump_symbols(buf: *u8, len: i64, sym_idx: i64, fd: i64) -> i64 |
| 251 | func main() -> i64 |