code wiki / (root) / nxld_main.nx

nxld_main.nx

buildroot/runtime/nxld_main.nx

1502 B50 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind orphan librarytopic nxld
docsdependenciesstructsconstsfunctions

about

nxld_main.nx -- CLI driver for the sovereign linker. Usage: nxld <input.o> > <output.elf> Reads input.o via sys_read_file, opens it as an Elf object, runs nxld_link() to produce a statically-linked RV64 Linux ELF executable, writes the bytes to stdout. Exit codes: 0 success 1 no args 2 read failed 3 open failed (bad ELF magic / not RV64 / etc.) 4 link failed Eventual goal: replace `riscv64-linux-gnu-ld` in verify.sh and bootstrap_proof.sh with `nxld`. Removes one of the two remaining gcc dependencies in the verify chain (the other being gcc-as, which the next sovereign tool nxasm-cli replaces).

dependencies 2 imports · 0 importers

syscalls.nx nxld.nx nxld_main.nx

imports: syscalls.nxnxld.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

24func main(argc: i64, argv: *i64) -> i64 {