mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 17:13:13 -05:00
A PS4 executable (CUSA00900) keeps 37 MiB of read-only data in its executable segment after the code. The syscall scan and the call-site resolution decoded the whole segment linearly, reached a float table and failed with "Unsupported 0F 79 opcode without SSE4A prefix". In executables with a PT_SCE_DYNLIBDATA segment they now stop at the end of the PLT that follows the last function of the unwind table. The PLT is found by searching forward from that function for its first entry, which pushes the GOT entry at PLTGOT + 8 and jumps through PLTGOT + 16, since code without unwind entries can sit in between (680 bytes of start-up code in an OpenOrbis-built sample). When the executable has PLT relocations and no such entry follows, the relinker fails instead of guessing. Executables without the segment are scanned as before. (cherry picked from commit a21e8fe4c0e6c03189d559e992c0f037c076700d)