From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:PRX (PSP module)" |
|---|
| claim | "Each import library in .lib.stub is a SceLibraryStubTable: 20 bytes (library name, version, attribute, length in words, variable count, function count, NID table, function stub table) or 24 bytes when the optional variable stub table pointer is present; the record length byte tells which." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PRX (PSP module)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "SceLibraryStubTable" |
|---|
| size_min | 20 |
|---|
| size_max | 24 |
|---|
| fields | | name | "libname" |
|---|
| offset | 0 |
|---|
| type | "const char*" |
|---|
|
| name | "version" |
|---|
| offset | 4 |
|---|
| type | "u8[2]" |
|---|
| note | "minimum version wanted" |
|---|
|
| name | "attribute" |
|---|
| offset | 6 |
|---|
| type | "u16" |
|---|
|
| name | "len" |
|---|
| offset | 8 |
|---|
| type | "u8" |
|---|
| note | "record size in 32-bit words (5 or 6); step to the next record is len*4" |
|---|
|
| name | "vstubcount" |
|---|
| offset | 9 |
|---|
| type | "u8" |
|---|
|
| name | "stubcount" |
|---|
| offset | 10 |
|---|
| type | "u16" |
|---|
|
| name | "nidtable" |
|---|
| offset | 12 |
|---|
| type | "u32*" |
|---|
| note | "section .rodata.sceNid" |
|---|
|
| name | "stubtable" |
|---|
| offset | 16 |
|---|
| type | "void*" |
|---|
| note | "8-byte stubs in .sceStub.text, one per function" |
|---|
|
| name | "vstubtable" |
|---|
| offset | 20 |
|---|
| type | "void*" |
|---|
| note | "only in the 24-byte form" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "SceLibraryStubTable typedef; modulemgr_patches.c advances records by libstubtable->len * 4" |
|---|
| repo | "https://github.com/pspdev/pspsdk" |
|---|
| commit | "6ef2b21dc440ef8d4125f000301faaa2a470975e" |
|---|
| path | "src/kernel/psploadcore.h" |
|---|
| lines | "231-252" |
|---|
|
| type | "source" |
|---|
| detail | "tools struct PspModuleImport without the vstubtable field (20 bytes), used by psp-fixup-imports" |
|---|
| repo | "https://github.com/pspdev/pspsdk" |
|---|
| commit | "6ef2b21dc440ef8d4125f000301faaa2a470975e" |
|---|
| path | "tools/prxtypes.h" |
|---|
| lines | "49-60" |
|---|
|
|
|---|
| confidence | "medium" |
|---|
| related | |
|---|
| key | "SceLibraryStubTable" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T09:11:59.119Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-18T21:45:15.223Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read pspsdk src/kernel/psploadcore.h (lines 231-252) and tools/prxtypes.h (PspModuleImport) at 6ef2b21d: SceLibraryStubTable libname*, u8 version[2], u16 attribute, u8 len (32-bit words), u8 vstubcount, u16 stubcount, nidtable*, stubtable*, vstubtable* gives offsets 0/4/6/8/9/10/12/16/20 with 32-bit pointers (24 bytes); PspModuleImport has no vstub pointer (20 bytes)." |
|---|
| notes | "The 8-byte stub size and section names (.sceStub.text, .rodata.sceNid) were not in these files." |
|---|
|
|
|---|