AnyPS5/core/relinker
Michon d29a1296cd fix(relinker): give Windows guest modules with TLS an import directory
The Windows loader sets up TLS for a dynamically loaded DLL only when it snaps
the DLL's imports. Guest modules had no import directory, so their TLS
directory was never processed: every guest module kept TLS index 0 and read
and wrote the executable's TLS block. A guest libc's thread-locals (gmtime's
buffer at +0x39c in Marvel's Wolverine) then ran past the executable's
0x150-byte block into the process heap, and corrupted a loader node that
crashed the next thread start in ntdll. Guest modules with TLS now import from
KERNEL32, as the executable does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 22:47:50 +02:00
..
cli feat(relinker): exclude single sce_module files, tolerate a zero code tail 2026-09-29 21:22:11 +03:00
codegen feat(relinker): lower register-form INSERTQ 2026-09-30 15:18:02 +02:00
domain/include/domain feat(relinker): add native guest module loading with export priority 2026-09-27 11:43:28 +03:00
elfpatcher fix(relinker): give Windows guest modules with TLS an import directory 2026-09-30 22:47:50 +02:00
io fix(relinker): reject overflowing buffer offsets 2026-09-30 18:07:26 +02:00
relinker fix(relinker): give Windows guest modules with TLS an import directory 2026-09-30 22:47:50 +02:00
CMakeLists.txt fix(relinker): give Windows guest modules with TLS an import directory 2026-09-30 22:47:50 +02:00
main.cpp feat(relinker): exclude single sce_module files, tolerate a zero code tail 2026-09-29 21:22:11 +03:00