mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 16:43:05 -05:00
unwrap_self reads the vaddr-less segments that follow the recorded comment segment back to back from right after its data, and refuses the whole container when one of them runs past the end of the file. Some dumps end right after the last recorded segment and do not store the version segment at all. The sce_module/libc.prx of PPSA15552 is one: its last record, the 0x58-byte comment at 0x13b590, ends at 0x13b5e8, which is the file size, so the 0x1a-byte PT_SCE_VERSION has no bytes and the tool failed with "segment 12 does not fit the file" although every load, dynamic and comment segment is complete. A trailing segment that would run past the end of the file is now emitted without file bytes, the same way as the PT_NOTE the container leaves out. The relinker does not read PT_SCE_VERSION (GuestImageReader skips it). Containers that store the version segment unwrap byte for byte as before.