code wiki / (root) / nx_nm.nx

nx_nm.nx

buildroot/runtime/nx_nm.nx

5937 B170 linesdepth 4pulls 5 transitivereach 2 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_nm.nx -- sovereign nm-equivalent (list ELF symbols). Reads an ELF via nx_elf_read, finds the .symtab section, and prints one line per symbol: <8-hex addr> <type-letter> <name> where type-letter follows the binutils nm convention: T = global text (function in .text) t = local text D = global data d = local data B = global bss b = local bss U = undefined ? = unknown One more sovereign tool that frees us from binutils. Together with nx_objdump / nx_dis / nx_addr2line / nx_dbg, the off-C inspection toolchain is fully self-hosted.

dependencies 3 imports · 2 importers

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

imports: syscalls.nxnx_elf_read.nxnx_strfmt.nx

imported by: nx_readelf.nxnx_toolchain.nx

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

main nx_nm_section_letter nx_nm_letter

structs

none

consts

none

functions

39func nx_nm_letter(sym_bind: i64, sym_type: i64, sym_shndx: i64,
called by 2: nx_nm_printmain
60func nx_nm_section_letter(name: *u8) -> i64
called by 2: nx_nm_printmain
72func nx_nm_find_symtab(buf: *u8, h: *NxElfHeader) -> i64
84func nx_nm_print(buf: *u8, len: i64, fd: i64) -> i64
130func main() -> i64