Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Overview and Heavy-Frame Census

Binary: extracted/aws-neuronx-runtime-lib_2.31.24.0-0b044f4ce_amd64/opt/aws/neuron/lib/libnrt.solibnrt.so.1libnrt.so.2.31.24.0 · Version 2.31.24.0-0b044f4ce (.nrt_brazil_version @0xad41f0 = "2.31.24.0") · BuildID[sha1] 8bb57aba0fb2e0035f1d88e9fc4fb3e7387c102e · ELF64 LSB DYN x86-64, SONAME libnrt.so.1 · 122,956,336 bytes on disk (~117 MiB) · NOT stripped.symtab 25,623 entries (readelf -SW: Size 0x96228 / entsize 0x18; nm --defined-only = 24,500 defined) + full DWARF v4 present. All four PT_LOAD segments are identity-mapped (p_offset == p_vaddr), so every PROGBITS section — .text, .rodata, and .data — has VMA == file offset; .bss is SHT_NOBITS and has no file content.

CORRECTION — earlier revisions of this page (and runtime/* siblings) claimed .data/.bss differ from their VMA by a 0x400000 delta. That is wrong for libnrt.so. readelf -lW libnrt.so.2.31.24.0 shows the RW LOAD segment at Offset 0xbeeaa0 == VirtAddr 0xbeeaa0 (delta zero), and readelf -SW shows .data at Address 0xc07e00 / Off 0xc07e00 — identical. The 0x400000 delta is a fact about a different binary (the libtpu / Kaena-profiler image), not libnrt. Read .data-resident globals at their VMA directly.

Part II — Binary Anatomy & Forensics / Section map · Evidence grade: byte-anchored (counts cross-checked nm/readelf/objdump vs IDA *_functions.json/*_frames.json/*_callgraph.json sidecars) · back to index

Abstract

This page is the orientation map for reading libnrt.so as an artifact. The runtime ships as a single 117 MiB shared object that statically vendors every heavy dependency it touches: objdump -p lists DT_NEEDED only for libgcc_s/libutil/librt/libpthread/libdl/libstdc++/libm/libc/ld-linux — there is no NEEDED entry for protobuf, Abseil, simdjson, zlib, or the Rust runtime, so all of those live inside this .text. Reading it is the familiar exercise of opening a large stripped-but-here-unstripped C++/Rust monolith: most of the byte mass is mechanical (vendored OSS object code and compiler-generated glue you must recognize and skip), and a minority is the first-party KaenaRuntime logic that the rest of this Part dissects.

The job of this page is to draw that line quantitatively. DWARF exposes 331 compile units: 203 first-party KaenaRuntime TUs (4,407 defined functions) built from the single source root /opt/workspace/KaenaRuntime/, plus 122 vendored/third-party TUs (4,384 functions) — Abseil, the Rust std/core/alloc crates, the KaenaProfilerFormat protobuf, Libarchive, simdjson, KaenaDriverLib, zlib. Those 8,791 DWARF subprograms-with-low_pc are the named code; IDA recovers 17,372 functions total, the balance being PLT thunks, .cold split fragments, and outlined trampolines that carry no DWARF subprogram of their own. By byte budget the heavy mass splits roughly 41.3% vendored / 58.7% first-party (3,148,991 B / 4,469,317 B over the 7,618,308-byte summed function extent from IDA functions.json — which is 96.0% of the 0x790b19 = 7,932,697-byte ELF .text section; the ~4% balance is inter-function padding and .text-resident data the function records do not span).

The page then quantifies the four "heavy" axes — byte size, stack-frame size, in-degree, fan-out — to point a reimplementer at where the work concentrates. The runtime's weight is not in its small public C API (nrt-api proper is ~0.20 MB / 341 fns); it is in ISA instruction validation (~1.42 MB / 369 fns, the largest single first-party region), collective-algorithm composition (~1.06 MB / 1,129 fns), and NEFF parsing (few but enormous per-function). Each deep region is a sibling page in this Part or in the subsystem Parts; this overview links them and does not duplicate their derivations.

For reimplementation, the contract this page establishes is:

  • The provenance split — which functions are first-party KaenaRuntime (worth reimplementing), which are vendored OSS (link the real library instead), and which are compiler-generated (reproduce structurally, never byte-for-byte). All three are quantified below with real counts.
  • The heavy-frame census — the byte-size, stack-frame, in-degree, and fan-out outliers, each anchored to symbol + address, so a port knows which functions are line-count sinks, which are stack-overflow hazards, and which leaves are reached by a third of the call graph.
  • The reading order — a pointer table to every Part-II sub-page and to the subsystem Parts where each densest region is reimplemented in full.
On-disk size / .text section122,956,336 B (~117 MiB) / .text = 0x790b19 = 7,932,697 B (readelf -SW) — of which 7,618,308 B is the summed extent of IDA-recovered function bodies (96.0%)
DWARF compile units331 (203 first-party + 122 vendored + builtins)
DWARF subprograms (low_pc)8,791 (4,407 first-party + 4,384 vendored)
IDA-recovered functions17,372 (balance = PLT/thunk/.cold/outlined)
First-party / vendored byte split4,469,317 B (58.7%) / 3,148,991 B (41.3%)
.symtab symbols25,623 entries (readelf -SW 0x96228/0x18); 24,500 defined (nm --defined-only)
Toolchains (.comment)GCC 14.2.1 (C++17), GCC 7.3.1/8.5.0 (legacy C), rustc 1.91.1, clang 21.1.0-rc2
RTTI201 _ZTV / 244 _ZTI / 245 _ZTS; no multiple/virtual inheritance
.init_array77 ctors @0xbf2b08 (616 B)
Source root/opt/workspace/KaenaRuntime/ (DW_AT_comp_dir …/build/private/develop/almalinux/RelWithDebInfo)

NOTE — the "117 MB" and "122,956,336 bytes" figures are the same object measured two ways (117.27 MiB). The disk size is dominated by DWARF (.debug_*) and the embedded ucode/dve/hw_decode data blobs; executable code is only 7.6 MB. A reimplementer sizing the logic should reason about the .text budget, not the on-disk size.


1. Provenance split — the pie, as a table

Every function in libnrt.so falls into one of three provenance classes. The split is the single most useful fact for orienting a reimplementation: it says what to rebuild, what to link, and what to regenerate. Counts below are from the DWARF CU partition (readelf --debug-dump=info, DW_AT_name/DW_AT_comp_dir) for the function/CU columns and from the IDA *_functions.json .size aggregate for the byte budget; the two methods are reconciled in §1.3.

1.1 By DWARF compile unit (the authoritative function partition)

fn = DW_TAG_subprogram with a DW_AT_low_pc inside the CU, deduped by low_pc. This is the count of defined bodies, and it is HIGH confidence — every path is a verbatim DW_AT_name string.

ProvenanceCUsfnsWhat it isClass
KaenaRuntime first-party2034,407The runtime itself: tdrv/enc/nrt/kelf/kmgr/nds/ucode/utils/nlog/… (§2)FIRST-PARTY
Rust std11,208library/std cgu — backtrace/symbolization, TLS, panic machineryVENDORED
Abseil lts_20230802911,177C++ support runtime: cord/status/strings/log/synchronization/time/swisstableVENDORED
KaenaProfilerFormat protobuf2730ntff.pb.cc (535) + neuron_trace.pb.cc (195) — generated accessorsGENERATED (AWS schema)
Rust core1543library/core cguVENDORED
Libarchive 3.8.0dev13362NEFF = gzip-tar: tar-format + gzip-filter readers + archive_entryVENDORED
KaenaDriverLib 2.27.4.0 (ndl.c)1123userspace driver shim (IOCTL/mmap wrappers)VENDORED (AWS)
Rust alloc1100library/alloc cguVENDORED
simdjson 0.9.0183NEFF JSON-metadata parser (dual-arch westmere+haswell)VENDORED
Rust crates (memchr/hashbrown/panic_unwind/std_detect)455memchr-2.7.5 (41) + hashbrown-0.15.5 (6) + panic_unwind (5) + std_detect (3)VENDORED
zlib 1.3.1 (builtin)636inflate/inftrees/inffast backing Libarchive gzipVENDORED
Rust compiler-builtins / compiler-rt74__* intrinsicsVENDORED
Vendored total1224,384(object code linked in, kept separate per SBOM)VENDORED

CORRECTION (F-3PVER) — the source-map cell originally noted "no protobuf-runtime CU is in libnrt … Abseil is the C++ support runtime instead", reading the absence of a protobuf-runtime DWARF CU as absence of the runtime. The runtime is statically linked: nm shows 3,003 defined google::protobuf text symbols including SerialArena/ThreadSafeArena/ArenaStringPtr and VerifyVersion @0x6fb690. The DWARF gap is a -g-less build of the runtime TUs (no line tables), not missing code. Abseil is also present — both are; they are not alternatives. See Vendored-Library SBOM.

1.2 By byte budget (where the line-count actually lives)

The CU table counts functions; this table counts bytes, which is the better proxy for reimplementation effort. Attribution is by demangled name-prefix over all 17,372 IDA records (MED–LOW on the edges, since .constprop/.isra/.part thunks can mis-bucket by a few percent; the totals are HIGH from objdump -p + .size sums).

BucketBytesfnsClassNote
isa-validate (1P)1,423,391369FIRST-PARTYlargest single 1P region — per-opcode legality DSL
protobuf1,164,5253,096VENDOREDTcParser/Arena/DescriptorBuilder
collectives/enc (1P)1,061,8791,129FIRST-PARTYmesh/hier/ring composers + schedulers
rust-std776,1612,730VENDOREDbacktrace_rs/gimli symbolization mass
abseil746,9001,913VENDOREDcctz/str_format/cord
libstdc++554,3651,616VENDORED (hdr-only inst.)template instantiations; .so.6 is dynamic
nrt-api proper (1P)201,744341FIRST-PARTYthe public C API surface is small
simdjson145,045117VENDORED×2: westmere + haswell stage2 copies
AL-HAL (1P)87,455471FIRST-PARTY*AnnapurnaLabs al_* HAL (distinct upstream)
neff-parse (1P)44,99010FIRST-PARTYfew functions, huge each
tdrv (1P)41,903260FIRST-PARTYdevice-driver core
neuron_rustime (1P-logic)30,43843FIRST-PARTY via Rustsys_trace crate (AWS-authored Rust)
zlib25,23833VENDOREDinflate/deflate
act-tables (1P)20,89255FIRST-PARTYactivation-table staging

QUIRK — the public C API (nrt_*) that consumers link against is one of the smallest first-party regions (0.20 MB, 341 fns). The runtime's mass is behind that thin façade: NEFF parsing, ISA validation, and collective-algorithm composition. A reimplementer who scopes effort from the export list (145 NRT_* GLOBAL symbols — 137 NRT_2.0.0 + 8 NRT_3.0.0; see ELF Anatomy §2) will badly under-budget. The exports are thunks into a 4.5 MB first-party body.

NOTE — AL-HAL (al_*, AnnapurnaLabs/Annapurna Labs HAL) is marked FIRST-PARTY* because it ships only inside AWS Neuron but is a distinct upstream component vendored from the driver tree. The HAL functions installed into kaena_khal are owned by Part IV's HAL pages; this Part owns the struct/singleton layout in Globals Atlas.

1.3 Reconciling the two counts (DWARF 8,791 vs IDA 17,372)

The DWARF subprogram count (8,791) and the IDA function count (17,372) differ by 8,581. That gap is not error; it is the mechanical residue:

17,372  IDA-recovered functions (functions.json)
 8,791  DWARF subprograms-with-low_pc  (= 4,407 first-party + 4,384 vendored)
 ──────
 8,581  PLT stubs + .plt.sec thunks
        + .cold split fragments (e.g. nrt_config_parse_init_config.cold @0x3f18e, 0xf82)
        + compiler-outlined .constprop/.isra/.part clones
        + static-data trampolines  — none carry their own DWARF subprogram

A reimplementer should treat the DWARF set as the logical function inventory (what to reproduce) and the IDA delta as toolchain artifacts (regenerated automatically by any optimizing compiler). The .cold split in particular means a single source function appears as two IDA records: the hot half keeps the nm t symbol; the cold half is a separate chunk. Byte sizes in §3 are the full extent including .cold.


2. First-party subsystem tree

The 4,407 first-party functions are built from one source root, /opt/workspace/KaenaRuntime/, in 203 TUs. The fn-weighted tree below is the second-level map a reader uses to decide which subsystem Part to open; each leaf is reimplemented in the named Part, not here.

KaenaRuntime/                                              CUs    fns   → owning Part
 ├─ tdrv/    device driver + instruction-block builders     84   2413   Part IV / Part VI
 │    ├─ cayman/ mariana/ sunda/   (per-silicon arch+isa+dve)
 │    └─ encd/ (+ encd/archs/)     execution-engine descriptor compiler  → Part IX
 ├─ enc/     host collectives engine                         52   1062   Part IX
 │    ├─ async_sr/                 async P2P sendrecv (OFI/rendezvous)
 │    └─ switch_platform/          switch-fabric collective composer
 ├─ nrt/     public C API + config/profile/sys_trace         27    377   Part IV / Part XIII
 ├─ kelf/    KELF/KBIN/NEFF container parse + numpy/HLO stats  5    318   Part V
 ├─ kmgr/    model/kernel manager (dlr, xu worker queue)      10    117   Part VII
 ├─ nds/     Neuron DataStore (folded from libnds.a)           6     36   Part XIV
 ├─ ucode/   microcode loader glue                             1     26   Part XI
 ├─ utils/   md5/sha256/instance/time helpers                  5     23   —
 ├─ nlog/    logging + backtrace + symbol resolution           3     15   Part IV
 ├─ ndebug/  ndebug_stream                                     1     10   Part XIII
 ├─ dve_config/  DVE config + per-arch                         4      7   Part IV
 ├─ dx/      dx/ring.c (notification ring)                     1      2   Part VIII
 ├─ hw_decode/  hw_decode table glue                           1      1   Part VI
 └─ build/private/.../*_bins.c  GENERATED blob stubs           3      0   (data, no code)
                                                            ────  ─────
                                                             203   4407

The densest single TUs (by DWARF fn-count) are the per-arch instruction-block builders and the collectives core, which is exactly where §3's byte-size outliers land:

TU (verbatim under /opt/workspace/KaenaRuntime/)fnsRole
enc/enc.cc352collective primitive core (largest C++ TU)
tdrv/instruction_block_mariana.c297per-arch instruction-block builder (largest TU overall)
tdrv/instruction_block_cayman.c248per-arch instruction-block builder
tdrv/instruction_block_sunda.c238per-arch instruction-block builder
tdrv/encd.c229execution-engine descriptor compiler
enc/enc_primitive.cc200collective primitives (send/recv leaves)
kelf/kelf.cpp184NEFF/KELF container decode
kelf/kelf2kbin.cpp126JSON → KBIN lowering
tdrv/encd/archs/{arch,cayman,mariana,sunda}.c101/95/95/88per-arch descriptor emitters

GOTCHA — the per-arch fan-out is triplicated, not parameterized. cayman/mariana/sunda each get their own instruction_block_*.c (248/297/238 fns), tdrv_arch_*.c, encd/archs/*.c, and dve_dynamic_config_*.c. A reimplementation that factors the three arches into one templated builder will not match the binary's call graph or its per-arch tdrv_arch_ops (488 B = 61 pointer slots, nm: tdrv_arch_ops @0xc97180tdrv_arch_ops_initialized @0xc97368, span 0x1e8) and kaena_khal (~200-slot @0xcaeb80) dispatch structs — those are installed by separate register_funcs_v{2,3,4} paths. See Dispatch-Table Taxonomy.


3. Heavy-frame census

Four independent "heavy" axes matter to a port, and all four are present in the data. Each is anchored to symbol + address; byte sizes are HIGH (spot-checked nm: 0x8a1d0=0x5a30=23,088 ✓, 0x2f2350=0x4620=17,952 ✓, 0x45fd50=0x73e=1,854 ✓).

3.1 Axis A — byte-size outliers (line-count sinks)

These are where reimplementation line-count concentrates. The top of the distribution is one config parser, then a wall of collectives composers/schedulers and ISA validators. SIZE is full extent including .cold; BLK/INSN from functions.json; NCLR = distinct callers.

AddrSizeBlkInsnSymbolSubsystemConf
0x8a1d023,0887134,318nrt_config_parse_init_confignrt-config 1PCERTAIN
0x19082022,2175063,891enc_mesh_primitive::__compose_allreduce_trn2collectives 1PHIGH
0x11f79021,2524733,765enc_post_operation(encd_context*, enc_op_list&)collectives 1PHIGH
0x1e371021,0175844,066rdh_scheduler::schedule_16_dev_reduce_scatter_vnc1collectives 1PHIGH
0x1eedd020,1695583,874rdh_scheduler::schedule_16_dev_reduce_scattercollectives 1PHIGH
0x2f235017,9525303,555is_valid_neuron_instructionisa-validate 1PCERTAIN
0x4bc62016,9695353,062parse_one_dma_block(mla_resources&, simdjson::…)neff-parse 1PHIGH
0x1eac4016,7815373,192rdh_scheduler::schedule_4_dev_reduce_scattercollectives 1PHIGH
0x3a60b016,6064993,288is_valid_neuron_isa_instructionisa-validate 1PHIGH
0x43f81016,0874883,202ib_is_valid_engine_instruction_v4isa-validate 1PHIGH
0x246ae014,7793523,064encd_load_executableneff-parse 1PHIGH
0x51011614,9334803,036std::backtrace_rs::symbolize::gimli::Cache::with_globalrust-std VHIGH
0x69aa6012,3356052,596protobuf::internal::TailCallTableInfo::ctorprotobuf VHIGH
0x26a31011,9224272,752tdrv_inittdrv 1PHIGH
0x4c087011,6393892,260kelf_load_from_neff(neff*, …, mla_resources&)neff-parse 1PHIGH
0x9aec010,0543742,132event_to_proto(nrt_sys_trace_event&, …)sys_trace 1PHIGH

Across the top-50 by size: 28 are collectives (enc_*/rdh_*/inter_rdh_*), 6 NEFF-parse, 4 ISA-validate, 2 nrt-config, and 6 vendored (protobuf ×2, abseil ×2, simdjson ×4). The collectives composer/scheduler family is the dominant heavy region.

NOTE — simdjson appears twice in the heavy list — simdjson::westmere::dom_parser_implementation::stage2 (0x4fa790, 10,451 B) and simdjson::haswell::…stage2 (0x4f5820, 10,171 B). Both are present because simdjson 0.9.0 ships per-microarchitecture copies and selects at runtime by CPU dispatch. A reimplementation that links one simdjson build will not reproduce the dual copy; that is correct, not a discrepancy.

3.2 Axis B — stack-frame outliers (clean-room hazards)

These are the functions a naïve port will get wrong at runtime, not at compile time: they reserve enormous stack frames that overflow a default thread stack. frames.json vars[] enumerate the exact large locals.

AddrFrameSymbolHazardConf
0x12a0c06,754,304enc_find_cc_context_by_signaturesingle 6,753,648-B struct local enc_ctxblows an 8 MB stack if nestedHIGH
0x319a30685,160act_local_storage_tbls_setup4 device-table staging buffers (524 KB + 2×64 KB + 16 KB) on stackHIGH
0x318d30~163,840stage_act_tbl_v2160 KB activation-table stagingHIGH
0x2f7e50141,096ib_create_one_block69 locals; per-block instruction builderHIGH
(per-op)31,744–40,960dbg_is_valid_<op>_{,_0,_1} familyeach per-opcode validator carries a 1,281-B diagnostic buffer + 50–69 localsMED

GOTCHA — enc_find_cc_context_by_signature (0x12a0c0) reserves a 6.75 MB stack frame for one enc_ctx struct local. On a default 8 MB pthread stack this is one nested call from overflow; on the smaller stacks used by worker pools it overflows immediately. Any reimplementation must heap-allocate enc_ctx (and the act_local_storage_tbls_setup staging buffers) rather than reproduce the on-stack layout. The binary gets away with it because these run on the main thread early in bring-up; a port that calls them from a kmgr/xu worker will crash. Census: 8 functions exceed a 64 KB frame; 341 exceed 8 KB. Full list → TDRV Bring-Up.

3.3 Axis C — in-degree outliers (the leaves to port first)

The most-called functions are the leaves a reimplementation must stub or port first, because a third of the call graph reaches them. Runtime intrinsics are filtered out to surface the first-party hot leaves. Two metrics: distinct-caller count (NCLR) and total call-site count.

SymbolDistinct callersCall sitesSize / AddrRole
nlog_write1,1933,795135 B @0x224d40the central log sink — ~1/3 of all fns reach it
al_hal_log4461,056163 B @0x265b80AnnapurnaLabs HAL log
al_hal_tpb_get_arch_type332per-core arch dispatch
al_reg_read32 / al_reg_write32193 / 177— / 729127 B @0x265c50HAL CSR read/write
al_abort_program159HAL fatal abort
neuron_isa_tpb_new_dbg_bool_1 / _0107 / 1041,025 / 967119 B @0x3aad80 / 0x323e40 (leaf)ISA-validate bool helper (arch variants)
neuron_isa_tpb_merge_dbg_bool_1 / _0857 / 804392 B @0x3aae00 / 0x323ec0 (leaf)ISA-validate merge helper
dbg_has_valid_neuron_header_1/_0, …events_1/_0100/98ISA header/event validators
tdrv_arch_ops_init / ensure_arch_ops_initialized78 / 78tdrv arch-vtable init

QUIRK — nlog_write and the al_* HAL primitives are tiny (119–163 B) but pervasive — they are the first leaves any port must stub. The neuron_isa_tpb_*_dbg_bool/merge_bool leaves come in _0/_1/base triplets (three arch variants of the same 119/392-B validation primitive); the 369-function ISA-validate tree is built entirely from these. Reference intrinsic toppers (filtered above): __assert_fail 2,308 distinct callers, _Unwind_Resume 1,751, operator delete 1,382, operator new 1,185, memcpy 738.

3.4 Axis D — fan-out outliers (the deepest orchestration chains)

The widest functions — most distinct callees — are the collective schedulers and the config/NEFF parsers. These are the deepest orchestration roots; a port must reproduce their call structure, not just their bodies.

CalleesAddrSymbolChain
5830x1e3710rdh_scheduler::schedule_16_dev_reduce_scatter_vnc1collectives compose
5380x1eedd0rdh_scheduler::schedule_16_dev_reduce_scattercollectives compose
5230x8a1d0nrt_config_parse_init_configconfig parse/dispatch
4320x9aec0event_to_prototrace serialization
2900x4b36b0parse_one_variableNEFF parse
2800x4bc620parse_one_dma_blockNEFF parse
2440x26a310tdrv_initdevice bring-up
2410x2f7e50ib_create_one_blockinstruction-block build

Three named hot-path roots tie the axes together:

NEFF LOAD       nrt_load → parse_neff_json (0xe1d10) → {parse_one_dma_block 0x4bc620,
                  parse_one_engine_instr 0x4b7e30, parse_one_variable 0x4b36b0}
                  → kelf_load_from_neff (0x4c0870) → encd_load_executable (0x246ae0)
                  ↳ bottoms out in simdjson westmere/haswell stage2 (0x4fa790 / 0x4f5820)

COLLECTIVES     enc_post_operation (0x11f790) → enc_init_comm (0x135d60)
                  → init_hierarchical_groups (0x12c820) → alg_mesh_build_full_mesh (0x125fb0)
                  → enc_*_primitive::__compose_* (28 composers)
                  → rdh_scheduler::schedule_* (deepest fan-out, 538–583 callees)

ISA VALIDATE    is_valid_neuron_instruction (0x2f2350) / is_valid_neuron_isa_instruction (0x3a60b0)
                  / ib_is_valid_engine_instruction_v4 (0x43f810)
                  → ~50 dbg_is_valid_<op>_{,_0,_1} per-opcode validators (31–41 KB frame each)
                  → neuron_isa_tpb_*_dbg_bool/merge_bool leaves (§3.3)

DEVICE BRING-UP tdrv_init (0x26a310) — 244 callees; installs tdrv_arch_ops + kaena_khal

4. Mechanical vs first-party-interesting

The governing distinction for reading this binary: most bytes are mechanical and should be recognized-and-skipped; the minority that is first-party KaenaRuntime is what the rest of this book reimplements. Three classes of mechanical mass:

Mechanical classBytes / fnsHow to treat itAnchor
Vendored OSS (protobuf 5.26.1, Abseil lts_20230802, simdjson 0.9.0, Libarchive 3.8.0dev, zlib 1.3.1, Rust std/core/alloc + crates)~3.15 MB / 8,499 fnsLink the real library at the pinned version; do not reverse itVendored SBOM
Compiler-generated protobuf (ntff.pb.cc / neuron_trace.pb.cc, 730 fns)Regenerate from the recovered .proto; the accessors are protoc outputNTFF format
CRT / static-init / PLT glue (77 ctors, __static_initialization_and_destruction_0 @0x75250, PLT thunks, .cold clones)Reproduce structurally; any optimizing toolchain emits equivalentsStatic-Init, CRT/PLT

The first-party-interesting mass — the 4.47 MB / 8,873 fns worth deep pages — is the ISA-validation DSL, the collective composers/schedulers, the NEFF parse pipeline, the tdrv device layer, the per-arch instruction-block builders, the nrt_config parser, and the neuron_rustime sys_trace bridge. The RTTI surface confirms the partition independently: of 201 vtables, 97 are google::protobuf, 16 Abseil, 13 std, 11 simdjson (all vendored), while only 40 ntff:: (AWS-authored schema) and 24 first-party global-namespace classes (enc_*/mem_ref*/dma_desc*/alg_mesh_*) carry domain logic — and there is no multiple/virtual inheritance anywhere (244 _ZTI = 53 __class_type_info root + 191 __si_class_type_info, 0 __vmi_class_type_info). See RTTI Class Hierarchy.

NOTE — the ntff:: 40-message set sits on the mechanical/interesting boundary: the accessors are generated (mechanical, regenerate), but the schema (40 message classes, the .ntff trace wire format) is AWS-authored and reimplementation-relevant. Treat the .pb.cc bodies as protoc output and the message field layout as a first-party artifact — covered in NTFF Trace Format.


5. Reading order — the Part-II sub-pages

This overview is the index for Part II. Each sibling page takes one forensic axis to byte-level depth; open them in roughly this order.

PageCoversKey anchors
ELF AnatomySection table, segment layout (all four PT_LOAD identity-mapped, so .data is also VMA==offset — no 0x400000 delta), DWARF presencereadelf -S/-l/-n; build-id 8bb57aba…
Vendored-Library SBOMThe 14-row version-pinned SBOM; protobuf 24-vs-26 and Rust 1.89-vs-1.91 conflict resolutionsGOOGLE_PROTOBUF_VERSION 5026001, /rustc/ed61e7d7e…, VerifyVersion @0x6fb690
Static-Init PipelineThe 77-entry .init_array order, which globals each ctor touches, what is lazy vs eager.init_array @0xbf2b08; ctors #10–#29 first-party
Globals and Singletons AtlasThe first-party control plane: kaena_khal, tdrv_arch_ops, nrt_config, ngc, vcores, async_sr_ctxs, ucode_func_symbolskaena_khal @0xcaeb80; nrt_config @0xc5c480
Dispatch-Table TaxonomyThe two coexisting per-arch vtables (kaena_khal ~200 slots vs tdrv_arch_ops 488 B / 61 slots), seed tables, register_funcs_v{2,3,4}seed off_BF3698/0xbf3778; kaena_khal_init selector
C++ Class Hierarchy and RTTI201 vtables / 244 typeinfo; mem_ref 10-class tree, dma_desc 4-class, enc_ins/enc_proxy_task, ntff:: 40 messages_ZTV @0xbf69580xbf8dc8 (1P); SI-only
String DomainProvenance markers: KaenaRuntime __FILE__ manifest, vendored OSS names, Rust panic strings, protobuf symbols, the env-var catalog/opt/workspace/KaenaRuntime/… paths; .nrt_brazil_version
CRT / PLT / Loader SurfaceDT_NEEDED (9 libs), PLT/GOT, .init/.fini, __cxa_atexit registrations, the dlopen targets (libncfw / libnrtucode_extisa)ucode_init_module @0x225940; encd_libncfw_init @0x251cc0

Subsystem PartRelationship to the heavy regions on this page
Part IV — Runtime CoreOwns tdrv_init, nrt_config_parse_init_config, the public C API thunks, the HAL function bodies
Part V — NEFF / KBINOwns the parse_one_* / kelf_load_from_neff / encd_load_executable NEFF pipeline (Axis A/D)
Part VI — TPB ISAOwns the 369-fn ISA-validate DSL (is_valid_neuron_instruction, dbg_is_valid_<op>) — the largest 1P region
Part IX — On-Device CollectivesOwns the enc_*/rdh_* composer/scheduler family (28 of top-50 by size; deepest fan-out)
Part XIII — Profiling & TraceOwns event_to_proto, the neuron_rustime sys_trace bridge, the ntff:: generated schema

Cross-References