code wiki / (root) / nx_readelf.nx

nx_readelf.nx

buildroot/runtime/nx_readelf.nx

6253 B178 linesdepth 5pulls 7 transitivereach 1 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_readelf.nx -- sovereign readelf (one-stop ELF dump). Combines our existing objdump + nm + dwarf-section enumeration into a single output that mirrors `readelf -a`. Useful as the canonical "show me everything in this ELF" tool for sovereign debugging without binutils. Sections: * ELF header * Program headers (with type / flags / vaddr / filesz / memsz) * Section headers (idx / name / type / addr / offset / size) * Symbol table (one entry per symbol) * (DWARF section sizes, if present) Pairs with nx_objdump (subset) + nx_nm.

dependencies 5 imports · 1 importers

syscalls.nx nx_elf_read.nx nx_strfmt.nx nx_objdump.nx nx_nm.nx nx_readelf.nx nx_toolchain.nx

imports: syscalls.nxnx_elf_read.nxnx_strfmt.nxnx_objdump.nxnx_nm.nx

imported by: nx_toolchain.nx

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

main nx_elf_parse_header nx_elf_get_u16_le nx_elf_get_u64_le nx_elf_get_u32_le nx_readelf_get_phdr nx_elf_get_u32_le ↻ nx_elf_get_u64_le ↻

structs

34struct NxReElfPhdr

consts

45const NX_RE_PHDR_BYTES: i64 = 64

functions

47func nx_readelf_get_phdr(buf: *u8, h: *NxElfHeader, idx: i64) -> *NxReElfPhdr
63func nx_readelf_program_headers(buf: *u8, len: i64, fd: i64) -> i64
112func nx_readelf_all(buf: *u8, len: i64, fd: i64) -> i64
135func main() -> i64