mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-05 13:20:11 +00:00
In PS4 executables and modules the bytes between unwind functions are 16-byte slots of function tails and padding, and a tail can begin inside an instruction, such as a lone REX byte before a 15-byte NOP. The syscall and call-site scans decode the executable segment linearly, so such a slot failed the relink with "Cannot decode instruction". For images with a PT_SCE_DYNLIBDATA segment the scans now receive the unwind function ranges. Outside every range an undecodable byte is skipped and decoding resumes at the next byte, and a decoding that would cross into a range ends at its start, so gap bytes cannot change how a function is decoded. Inside a range a decode failure still fails the relink, and images without unwind ranges are scanned as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>