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.
splits.txt is the primary configuration file that tells decomp-toolkit how to partition a compiled binary into its constituent translation units. Each entry maps a source file path to one or more address ranges within the binary’s sections, allowing the build system to reconstruct the object files that the original linker combined. The file does not need to reference source files that already exist — splits can be defined speculatively before the corresponding .cpp file is written.
Example
The following is a representative excerpt from Petari’sconfig/RMGK01/splits.txt:
Format
src/ directory. Each section line names the ELF section followed by any number of section attributes.
File attributes
File attributes appear on the same line as the source file path, after the colon.comment:
comment:
Overrides the
mw_comment_version setting from config.yml for this specific file. See Comment section for the full explanation of what this version controls.The most common use is comment:0, which disables .comment section generation entirely for files that were not compiled with mwcc (for example, files assembled with powerpc-eabi-as). Generating a .comment section for an assembled object will cause mwld to crash.order:
order:
Provides a hint for the resolved link order of objects. decomp-toolkit generates the link order automatically in most cases, so this attribute is not required. Use it to anchor a file’s position when the automatic resolution is ambiguous.This guarantees that
file2.cpp is always resolved between file1.cpp and file3.cpp in the final link order.Section attributes
Section attributes appear after the section name on each indented line.start: and end:
start: and end:
Define the address range occupied by this section within the file.
- For DOL (main executable) splits, addresses are absolute:
start:0x80001234 - For REL (relocatable module) splits, addresses are section-relative:
start:0x1234
start: and end: are required for every section entry.align:
align:
Specifies the alignment of the section in bytes. When omitted, decomp-toolkit uses the default alignment for the section type as declared in the
Sections: block at the top of splits.txt.rename:
rename:
Writes the section under a different name in the generated split object. This is used for named subsections such as
.ctors$10, which the linker uses to control initialization ordering.common
common
Marks a
.bss range as belonging to the common BSS area. This attribute is only valid on .bss sections. Correctly tagging common BSS ranges is important for determining the final link order and for reproducing the common BSS inflation bug in older linkers.See Common BSS for a full explanation.skip
skip
Skips this address range when writing the object file. Use this for data that the linker generates itself (for example, linker-synthesized padding or metadata) so that decomp-toolkit does not try to reconstruct it from source.
The __init_cpp_exceptions.cpp split
The C++ exception-handling runtime requires a special split for the __init_cpp_exceptions object. Its exact form depends on which linker version was used to build the binary.
GC 1.0 – GC 2.6 linkers
The
rename:.ctors$10 entry is required for GC 2.7+ builds because the newer linker uses a named subsection to order the C++ exception initializer relative to other constructors.