Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/SMGCommunity/Petari/llms.txt

Use this file to discover all available pages before exploring further.

symbols.txt provides decomp-toolkit with a complete inventory of every symbol in a module. Each line associates a name — which for C++ code is the mangled identifier — with its section, address, and optional metadata. This metadata drives disassembly formatting, object generation, and linker script production. The file is updated automatically when decomp-toolkit analyzes the binary, but individual entries can be hand-edited or annotated to guide the tooling.

Format

symbol_name = section:address; // [attributes]
  • symbol_name — The symbol’s identifier. For C++ symbols this is the mangled name (for example, __dt__13mDoExt_bckAnmFv is the destructor of mDoExt_bckAnm).
  • section — The ELF section the symbol lives in (for example, .text, .data, .bss).
  • address — The symbol’s address. For DOL splits this is an absolute address; for REL splits it is section-relative. Numbers may be decimal or hexadecimal; hexadecimal values must be prefixed with 0x.
Comment lines beginning with // or # are permitted but are not preserved when decomp-toolkit rewrites the file.

Examples from Petari

__start = .init:0x8000403C; // type:function size:0x16C scope:weak
__init_hardware = .init:0x800042E0; // type:function size:0x24 scope:global
_rom_copy_info = .init:0x80006420; // type:object size:0x84 scope:global data:4byte
gTRKInterruptVectorTable = .init:0x800044C0; // type:label scope:global
@etb_800064E0 = extab:0x800064E0; // type:object size:0x8 scope:local hidden
__dt__13mDoExt_bckAnmFv = .text:0x800DD2EC; // type:function size:0x5C scope:global align:4

Attributes

All attributes are optional and space-separated inside the // … comment.
The kind of symbol. Affects how decomp-toolkit generates disassembly and object files.
ValueMeaning
functionExecutable code. Disassembled as PowerPC instructions.
objectData. Disassembled according to the data: attribute.
labelAn address marker with no associated size.
__start = .init:0x8000403C; // type:function size:0x16C scope:weak
gTRKInterruptVectorTable = .init:0x800044C0; // type:label scope:global
_rom_copy_info = .init:0x80006420; // type:object size:0x84 scope:global data:4byte
The size of the symbol in bytes. Required for object symbols to produce correct disassembly. Accepts decimal or 0x-prefixed hexadecimal.
__fill_mem = .init:0x80004388; // type:function size:0xB4 scope:global
The symbol’s visibility in the generated object file.
ValueMeaning
globalExported; visible to the linker from other objects. This is the default.
localFile-scoped; not exported. Corresponds to static in C/C++.
weakExported but may be overridden by a strong definition elsewhere.
__set_debug_bba = .init:0x80004028; // type:function size:0xC scope:local
__start = .init:0x8000403C; // type:function size:0x16C scope:weak
__init_hardware = .init:0x800042E0; // type:function size:0x24 scope:global
The alignment of the symbol in bytes. When specified, decomp-toolkit uses this value instead of inferring alignment from the surrounding data.
__dt__13mDoExt_bckAnmFv = .text:0x800DD2EC; // type:function size:0x5C scope:global align:4
Controls how an object symbol’s bytes are formatted in the disassembly output. Only meaningful when type:object is also set.
ValueDescription
byte8-bit unsigned integers
2byte16-bit unsigned integers
4byte32-bit unsigned integers
8byte64-bit unsigned integers
float32-bit IEEE 754 floats
double64-bit IEEE 754 doubles
intSigned 32-bit integers
shortSigned 16-bit integers
stringNull-terminated ASCII string
wstringNull-terminated wide (UTF-16) string
string_tableArray of null-terminated ASCII strings
wstring_tableArray of null-terminated wide strings
_rom_copy_info = .init:0x80006420; // type:object size:0x84 scope:global data:4byte
Marks the symbol as hidden in the generated ELF object. This is currently used only for extab symbols related to C++ exception handling.
@etb_800064E0 = extab:0x800064E0; // type:object size:0x8 scope:local hidden
Marks the symbol as “exported” in the generated object and adds it to FORCEACTIVE in the generated ldscript.lcf. This prevents the linker from dead-stripping the symbol even if it appears unreferenced.See Comment section for how the export flag interacts with .comment section generation.
SomeInitFunction__Fv = .text:0x80001000; // type:function size:0x10 force_active
Prevents the contents of the symbol from being interpreted as addresses during relocation analysis. Use this for data objects whose byte patterns happen to look like pointers but are not.
sSomeLookupTable = .data:0x80563420; // type:object size:0x40 noreloc
When the export_all option is enabled in the project configuration, this flag excludes the symbol from being exported. Use it for symbols that are affected by the linker’s -code_merging optimization and should not be forced active.
sMergedFunction__Fv = .text:0x80002000; // type:function size:0x8 noexport
Indicates that this symbol was removed by the linker from the final binary. Stripped symbols are still recorded because they can influence the common BSS inflation bug even though they do not appear in the output.
sStrippedGlobal = .bss:0x8060A000; // type:object size:0x4 stripped

Build docs developers (and LLMs) love