From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Library:Libdragon" |
|---|
| claim | "The libdragon symbol table file (.sym in the rompak, trunk branch) starts with 'SYMT', u32 version (2), then offset/count pairs for the address table, the symbol table and the string table; offsets are from the start of the SYMT file." |
|---|
| scope | | level | "library" |
|---|
| applies_to | "Library:libdragon" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "libdragon_symt_v2_header" |
|---|
| size | "0x20" |
|---|
| fields | | offset | "0x00" |
|---|
| size | 4 |
|---|
| type | "char[4]" |
|---|
| name | "magic" |
|---|
| notes | "'SYMT'" |
|---|
|
| offset | "0x04" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "version" |
|---|
| notes | "2 on trunk; preview writes 5 (different layout)" |
|---|
|
| offset | "0x08" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "addrtab_off" |
|---|
| notes | "sorted u32 RAM addresses; bit 0 = function start, bit 1 = inline duplicate" |
|---|
|
| offset | "0x0C" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "addrtab_count" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "symtab_off" |
|---|
| notes | "16-byte entries, one per address" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "symtab_count" |
|---|
|
| offset | "0x18" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "strtab_off" |
|---|
|
| offset | "0x1C" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "strtab_size" |
|---|
|
|
|---|
| endianness | "big" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "symtable_header_t {head 'SYMT', version, addrtab_off, addrtab_size, symtab_off, symtab_size, strtab_off, strtab_size}; address table bit 0 function start, bit 1 inline" |
|---|
| repo | "https://github.com/DragonMinded/libdragon" |
|---|
| commit | "e356bf3f56f7afbf7e5246329562f145965cfdfc" |
|---|
| path | "src/backtrace.c" |
|---|
| lines | "86-117" |
|---|
|
| type | "source" |
|---|
| detail | "writes 'SYMT', version 2, offsets, then 16-aligned address, symbol and string tables" |
|---|
| repo | "https://github.com/DragonMinded/libdragon" |
|---|
| commit | "e356bf3f56f7afbf7e5246329562f145965cfdfc" |
|---|
| path | "tools/n64sym.c" |
|---|
| lines | "320-353" |
|---|
|
| type | "source" |
|---|
| detail | "_w32 writes v>>16 then v&0xffff via w16 (big endian); w32_placeholder/w32_at patch the offsets" |
|---|
| repo | "https://github.com/DragonMinded/libdragon" |
|---|
| commit | "e356bf3f56f7afbf7e5246329562f145965cfdfc" |
|---|
| path | "tools/common/binout.c" |
|---|
| lines | "45-62" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "SYMT v2 header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T04:49:51.671Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T17:25:27.263Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read symtable_header_t in src/backtrace.c at the cited commit: char head[4], then seven uint32 (version, addrtab_off, addrtab_size, symtab_off, symtab_size, strtab_off, strtab_size) = 0x20 bytes; sizes of the first two tables are entry counts, strtab_size bytes of string data; offsets in file. Writer byte order (binout.c) not re-read." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T12:13:01.394Z" |
|---|
| summary | "Byte order missing: n64sym writes all fields through w32/w16 of tools/common/binout.c, which emit the high half first (big endian). Also strtab_size is a byte count, addrtab/symtab counts are entries." |
|---|
| changed | |
|---|
|
|
|---|