mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-04 13:07:32 +00:00
FindSceCodeEnd looked for the PLT only after the last function of the unwind table and failed with "PLT not found after the last unwind function" otherwise. The libSceFios2.prx and libc.prx that Until Dawn (CUSA02636) bundles have their PLT at 0xc8, at the start of the text segment, before the code. In both, the last unwind function is followed by the module's DT_FINI routine, which has no unwind entry, and then by read-only data. When no PLT follows the last unwind function, the search now also looks before it. A PLT found there must not overlap an unwind function, and the code extent then ends at the last unwind function, so what follows it stays out of the scans and the code analysis, including code without an unwind entry such as the DT_FINI routine of both modules (recorded in the debt file). A missing PLT now fails with "PLT not found before or after the unwind functions". Co-Authored-By: Claude Opus 5.5 <[email protected]>