Format:PS Vita module info
| Platforms | Platform:PlayStation Vita |
|---|---|
| Endianness | little |
| On this wiki | Facts · Code · Notes · Topics |
The module record of PS Vita executables and libraries (ELF32 ARM, e_type 0xFE00 or 0xFE04): a 0x5C-byte sce_module_info in section .sceModuleInfo.rodata with name, NID, entry points and ARM exidx/extab ranges, export tables of 0x20 bytes and import tables of 0x34 bytes whose functions are named by NID.
Overview
vita-toolchain converts a normal ARM ELF into a velf with vita-elf-create, then wraps it as a SELF (eboot.bin, .suprx). The velf keeps SCE-specific types: ET_SCE_EXEC 0xFE00 (executable), ET_SCE_RELEXEC 0xFE04 (relocatable, as used for modules), ET_SCE_STUBLIB 0xFE0C (SDK stubs); section type SHT_SCE_RELA 0x60000000 and segment type PT_SCE_RELA 0x60000000 carry relocations.
sce_module_info (0x5C bytes)
In section .sceModuleInfo.rodata (sce-elf-defs.h): attributes u16 (0 none, 1 cannot stop, 2 exclusive load, 4 exclusive start), version u16 (0x0101), name 27 bytes, type u8 (0 executable, 6 PRX), gp value, export top/end, import top/end, module NID, TLS start / file size / mem size, module_start, module_stop, exidx top/end, extab top/end. Pointer fields are 32-bit offsets or addresses.
Exports (0x20 bytes)
size 0x20, version (1 normal, 0 main module), flags (1 normal, 0x8000 main module), function count u16, variable count u32, TLS variable count u32, library NID, library name pointer, NID table pointer, entry table pointer.
Imports (0x34 bytes, or a 0x24-byte short form)
size, version 1, flags, function / variable / TLS variable counts (u16), library NID, library name pointer, then function NID table and stub table, variable NID table and entry table, TLS tables. Function stubs are filled by the module manager when the library is resolved.
Process parameters
Executables embed a process_param record (magic PSP2, 0x30 bytes in v5, 0x34 in v6: SDK version, main thread name, priority, stack size, attribute, process name, a pointer to the sce_libc_param record with malloc/new replacement tables and the default heap size 0x40000). Firmware 1.692 (0x1692000) and later use the v6 layout.
Pitfalls
- The export count fields differ in width between exports (u32 variable counts) and imports (u16).
- NID names come from databases, see Technique:SCE NID imports and exports.
Code & repositories
See Platform:PlayStation Vita.
- https://github.com/vitasdk/vita-toolchain @
008ddc2d7fd4bd16631d1e49cacf308de6f545f1· license: MIT
Vita toolchain (MIT): sce-elf structs, vita-elf-create, vita-make-fself, vita-pack-vpk, NID db format
Tested on: source read, not run: source read, src/ at the pinned commit · checked 2026-10-18; last activity 2026-10-13