Format:DOL executable
| Platforms | Platform:Nintendo GameCube, Wii |
|---|---|
| Magic | none (header of 0x100 bytes) |
| Extensions | .dol |
| Endianness | big |
| On this wiki | Facts · Code · Notes · Topics |
Main executable format of the Nintendo GameCube and Wii (sys/main.dol on disc, also homebrew .dol files): a 0x100-byte big-endian header with file offsets, load addresses and sizes of up to 7 text and 11 data sections, the BSS address and size and the entry point, followed by the raw section contents. There is no magic number, no symbol table and no relocation information.
Overview
A DOL is a memory image split into sections. The apploader (or a homebrew loader) copies each section from its file offset to its address and jumps to the entry point; the program's own startup code (__start, __init_data) then clears BSS. Everything is big endian.
Header
| Offset | Size | Field |
|---|---|---|
| 0x00 | 7 x 4 | file offsets of text sections 0-6 |
| 0x1C | 11 x 4 | file offsets of data sections 0-10 |
| 0x48 | 7 x 4 | load addresses of text sections |
| 0x64 | 11 x 4 | load addresses of data sections |
| 0x90 | 7 x 4 | sizes of text sections |
| 0xAC | 11 x 4 | sizes of data sections |
| 0xD8 | 4 | BSS address |
| 0xDC | 4 | BSS size |
| 0xE0 | 4 | entry point |
| 0xE4 | 0x1C | padding (zero) |
Unused sections have size 0. The BSS range usually spans several linker sections (.bss, .sbss, .sbss2) and can overlap the small-data sections stored between them; the startup code zeroes only the ranges in _bss_init_info.
Typical layout (CodeWarrior)
In games built with Tool:Metrowerks CodeWarrior: text 0 = .init at 0x80003100 (startup code __start, memset, memcpy, then the MetroTRK exception vector table), text 1 = .text; data sections in order extab, extabindex, .ctors, .dtors, .rodata, .data, .sdata, .sdata2. The splits of Software:The Legend of Zelda: The Wind Waker (GZLE01, config/GZLE01/splits.txt) list the sections in this order, with .bss, .sbss and .sbss2 between them as BSS. Section names are not stored in the file: tools infer them from this order and from _rom_copy_info/_bss_init_info, two tables in .init that list every section's address and size.
Recognizing a DOL
Without a magic number, check that: the first text offset is 0x100 (or at least 0x100), every non-empty section lies inside the file, addresses are in 0x80000000-0x817FFFFF (GameCube) or up to 0x81800000/MEM2 for Wii, and the entry point falls inside a text section. The script on Code:DOL executable/GameCube formats toolkit (Python) prints the sections.
Tools
- decomp-toolkit (
dtk dol info,dtk dol split) reads the header (src/util/dol.rs) and recovers sections from_rom_copy_info. - Ghidra (built-in GameCube loader in recent versions, or the community GameCube loader) and Dolphin's debugger load DOLs at their addresses.
Code & repositories
- https://github.com/encounter/decomp-toolkit @
0645e16511814920ffb05b25615dd71f1af73e4c· license: Apache-2.0
decomp-toolkit (dtk, Rust, MIT OR Apache-2.0): splits GameCube/Wii DOLs and RELs into objects for matching decompilations, reads and writes DOL, REL, RARC, U8, Yaz0/Yay0 and the CodeWarrior .comment section, and generates symbols.txt/splits.txt configurations.
Tested on: Read at commit 0645e16: src/util/dol.rs (DolHeader), src/util/rel.rs (R_DOLPHIN_* types), src/util/rarc.rs, src/util/comment.rs; not built. · checked 2026-10-17; last activity 2026-09-10; Note: the latest release ships binaries; the wiki links only the source, never the binaries
Open questions
- Exact apploader behaviour for sections that overlap BSS has not been checked here.