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

Switch > NSO0 Files

An NSO0 file contains an executable.

OffsetSizeDescription
0x04Magic number (NSO0)
0x44Version (always 0)
0x84Padding (always 0)
0xC4Flags
0x104Offset to .text segment in file (absolute)
0x144Address of .text segment in memory
0x184Size of .text segment in memory
0x1C4Offset to null-terminated module name in file (absolute)
0x204Offset to .rodata segment in file (absolute)
0x244Address of .rodata segment in memory
0x284Size of .rodata segment in memory
0x2C4Size of module name, including null terminator
0x304Offset to .data segment in file (absolute)
0x344Address of .data segment in memory
0x384Size of .data segment in memory
0x3C4Size of .bss segment in memory
0x4032Module id (random bytes / hash)
0x604Size of .text segment in file
0x644Size of .rodata segment in file
0x684Size of .data segment in file
0x6C28Padding (always 0)
0x884“Embedded offset” (?)
0x8C4“Embedded size” (?)
0x904Offset to .dynstr section, relative to .rodata segment
0x944Size of .dynstr section
0x984Offset to .dynsym section, relative to .rodata segment
0x9C4Size of .dynsym section
0xA032SHA-256 of decompressed .text segment
0xC032SHA-256 of decompressed .rodata segment
0xE032SHA-256 of decompressed .data segment
0x100Null-terminated module name
.text segment data (optionally compressed)
.rodata segment data (optionally compressed)
.data segment data (optionally compressed)

Notes:

  • The module name seems to be empty for games.
  • The .text, .rodata and .data segments do not need to be aligned to word boundary (there is no padding between them).

Flags

FlagDescription
0x1.text segment is compressed
0x2.rodata segment is compressed
0x4.data segment is compressed
0x8.text hash is valid
0x10.rodata hash is valid
0x20.data hash is valid
0x40Execute-only memory is enabled
0x80ZBIC compression is used instead of LZ4

References