AnyPS5/core/relinker/elfpatcher/src
poonasor c6f934a3d0 fix(relinker): move a short guest TLS access's follower branch into its stub
A short fs-prefixed TLS access is patched with a 5-byte jump by
relocating the following instructions into the stub, but any branch
there was rejected outright. NHL 27 hits this on every stack-protector
epilogue: fs:xor rax,[rbx] immediately followed by jne __stack_chk_fail.

Allow relative conditional branches and short jumps: re-encode rel8
forms as their rel32 equivalents, rebase the displacement when the
stub is emitted, and keep rejecting loop/jrcxz, calls, returns, and
segment-prefixed followers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 23:44:54 -04:00
..
general Merge pull request #3774 from MrMha/fix/program-layout-ranges 2026-10-12 00:00:46 +02:00
linux fix(relinker): skip the desktop entry for macOS output and use native paths 2026-10-11 12:55:22 +02:00
macos fix(relinker): pass module start arguments to macOS guest initializers 2026-10-11 11:22:38 +00:00
windows fix(relinker): move a short guest TLS access's follower branch into its stub 2026-10-11 23:44:54 -04:00