FAIL: Unsupported Windows guest TLS instruction (offset 0x7479a98) #217
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by lerrel129 on 2026-10-01T14:39:03Z.
Environment
PPSA34063-app0/eboot.bin)Description
When attempting to relink
eboot.binon Windows, the process fails with an unsupported TLS instruction error.Log Output
F:\prx-windows-v0.1.1\libs>relinker-v0.1.1.exe --windows --to-intel unused-filter=1 "F:\NHL 27\PPSA34063-app0\eboot.bin" "F:\prx-windows-v0.1.1\libs\game.exe"
Intel substitution: INSERTQ at 0xa12755 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0xa127ad (6 bytes) -> stub 48 bytes
Intel substitution: EXTRQ at 0xfd5c0f (6 bytes) -> stub 32 bytes
Intel substitution: INSERTQ at 0x2ab1f4d (6 bytes) -> stub 32 bytes
Intel substitution: INSERTQ at 0x2c8e0cb (6 bytes) -> stub 48 bytes
Intel substitution: EXTRQ at 0x305ed96 (6 bytes) -> stub 32 bytes
Intel substitution: EXTRQ at 0x305ef7f (6 bytes) -> stub 32 bytes
Intel substitution: EXTRQ at 0x306000d (6 bytes) -> stub 32 bytes
Intel substitution: EXTRQ at 0x30601ad (6 bytes) -> stub 32 bytes
Intel substitution: INSERTQ at 0x3077e10 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x3078292 (7 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x30782fc (7 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x307859a (7 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x3079c97 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x3150295 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x31502b0 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x3f61bc5 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x4c13994 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x82018e7 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x8202189 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x8efc254 (6 bytes) -> stub 48 bytes
Intel substitution: EXTRQ at 0x93a3272 (6 bytes) -> stub 32 bytes
Intel substitution: INSERTQ at 0x9634a69 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9634bc0 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9634d25 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9634e4b (7 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x96ea4c9 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x96ea4f4 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9a0d860 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9a0d90b (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9a0d9b8 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9a0da64 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9a0db16 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9a0dbca (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9a0dc75 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9a0dd1f (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9a0ddc4 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0x9d0904f (6 bytes) -> stub 32 bytes
Intel substitution: INSERTQ at 0x9d0906f (6 bytes) -> stub 32 bytes
Intel substitution: INSERTQ at 0x9f532a3 (6 bytes) -> stub 32 bytes
Intel substitution: INSERTQ at 0xa262555 (6 bytes) -> stub 32 bytes
Intel substitution: EXTRQ at 0xa882cf8 (6 bytes) -> stub 32 bytes
Intel substitution: INSERTQ at 0xb5ad62e (7 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0xb5aed11 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0xb5e98f0 (6 bytes) -> stub 48 bytes
Intel substitution: INSERTQ at 0xbe4e9ca (6 bytes) -> stub 32 bytes
Intel substitution: INSERTQ at 0xbe4fd1a (6 bytes) -> stub 32 bytes
Intel conversion: 0 in place, 47 stubs
System: Windows; unused-filter=1
sce_module/sce_modules processing: enabled
NID input: 9033 references
PLT preservation: 1076 -> 1076; filtered=0
CFG/GOT filtering: 7957 -> 1; filtered=7956
NID total: 9033 -> 1077; filtered=7956
FAIL: Unsupported Windows guest TLS instruction (offset 0x7479a98)
Imported from boykopovar/AnyPS5. Originally posted by QDarkRex on 2026-10-02T04:09:39Z.
Thanks for the report. Two things:
1. Output location. Write the executable next to
libs\, not inside it:relinker-v0.1.1.exe --windows --to-intel unused-filter=1 "F:\NHL 27\PPSA34063-app0\eboot.bin" "F:\prx-windows-v0.1.1\game.exe"It looks for libraries in
libs\beside itself, so insidelibs\it would searchlibs\libs\.2. The TLS error. The relinker only supports two specific thread-local-storage instruction forms on Windows, and this game uses another one. Could you post:
--skip-sce-module(it tells us whether the failing code is ineboot.binor insce_module);Get-ChildItem 'F:\NHL 27\PPSA34063-app0\sce_module' | select Name,Length$f=[IO.File]::OpenRead('F:\NHL 27\PPSA34063-app0\eboot.bin'); $f.Position=0x7479a98-16; $b=New-Object byte[] 48; [void]$f.Read($b,0,48); $f.Close(); ($b|%{'{0:x2}' -f $_}) -join ' 'With those we can tell exactly which instruction form needs support.
Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-10-02T05:59:31Z.
Regarding
FAIL: Unsupported Windows guest TLS instruction (offset 0x7479a98)- thanks for reporting it. We'll fix it. We have some ideas #222Imported from boykopovar/AnyPS5. Originally posted by lerrel129 on 2026-10-02T06:40:38Z.
Imported from boykopovar/AnyPS5. Originally posted by QDarkRex on 2026-10-02T06:48:34Z.
Thanks! That pins it down. Disassembly of the bytes (failing instruction starts exactly at 0x7479a98):
It's a stack-protector prologue reading the canary from
fs:0x28. Since it still fails with--skip-sce-module(and without--to-intel), it's ineboot.binitself.@boykopovar, I know you already have a fix in mind with #222, so this is just to help with it: the form here isn't covered by #222 as it stands. I tested
64 48 8b 04 25 28 00 00 00against main and against #222, and both reject it. The builder already handles the dword store tofs:0x28but not loads from it. Protected functions usually also readfs:0x28again in the epilogue check (cmp/sub reg, fs:0x28), so those forms will likely be needed too. Happy to share the synthetic test cases if they're useful.(Side note: this game's
sce_moduleships its ownlibc.prx, so--skip-sce-moduleis the right flag for it anyway.)Imported from boykopovar/AnyPS5. Originally posted by boykopovar on 2026-10-02T07:09:38Z.
We need to support the general form
mov r64, fs:[disp32]. The current stub forfs:[0]returns the pointer itself. For the general case, we need to actually read memory at the calculated address, not just return the pointer plus the offset.It's worth testing zero, multiple positive and negative offsets.
#222 is merged, but it really doesn't cover this case.
Imported from boykopovar/AnyPS5. Originally posted by QDarkRex on 2026-10-02T07:17:34Z.
Thanks, that's clear. Since #222 is merged and nobody else seems to be on it, I can take
mov r64, fs:[disp32]: load from thread pointer + disp32 into any destination register except rsp, with tests that execute the relinked code and check the loaded values at zero, several positive and several negative offsets. I'll open it as a separate PR. Let me know if you'd rather handle it yourself.Imported from boykopovar/AnyPS5. Originally posted by QDarkRex on 2026-10-02T09:48:09Z.
Opened #340 for
mov r64, fs:[disp32], including thefs:0x28canary load from this report. It only covers this load form; if NHL 27 hits another unsupported TLS form after it, the error will give its offset again and the bytes can be dumped the same way as before.Imported from boykopovar/AnyPS5. Originally posted by lerrel129 on 2026-10-05T17:20:13Z.
After fix #340, NHL 27 now gets past the original MOV instruction
at offset 0x7479a98, but fails on another TLS instruction:
FAIL: Unsupported Windows guest TLS instruction
(bytes: 64 48 33 1c 25 28 00 00 00) (offset 0x7479e33)
This decodes to:
xor rbx, qword ptr fs:[0x28]
Built from main, commit:
71827e5c06Windows x64, MinGW-w64 GCC 15.2.0, Release build.
Game: NHL 27, PPSA34063-app0/eboot.bin.
The same error occurs both with and without --skip-sce-module,
so the failing instruction is in eboot.bin itself.
Could you add support for this FS-relative XOR form?
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-06T05:25:16Z.
#767 is merged (
109a3281). The relinker now accepts the read-direction ALU formsOP r64, fs:[disp32](add,or,adc,sbb,and,sub,xor,cmpwith REX.W and SIB0x25), which includes the instruction from your last comment,64 48 33 1c 25 28 00 00 00(xor rbx, fs:[0x28]) at 0x7479e33. The stub loads the canary and applies thexoras its last flag-setting instruction, so the branch after it sees the right flags.It was checked at the byte level only, so your run is the first real test. Could you rebuild from
mainat109a3281or later and relink again?FAIL:line (it includes the bytes and the offset) and the commit you built.game.exewould show what NHL 27 needs next.Imported from boykopovar/AnyPS5. Originally posted by lerrel129 on 2026-10-07T17:35:48Z.
F:\AnyPS5\build\core\relinker>relinker.exe --windows --skip-sce-module "F:\NHL 27\PPSA34063-app0\eboot.bin" "F:\prx-windows-v0.1.1\game.exe"
System: Windows; unused-filter=0
sce_module/sce_modules/prx processing: disabled (--skip-sce-module)
NID input: 9033 references
Unused NID filtering: disabled; filtered=0
NID total: 9033 -> 9033; filtered=0
FAIL: Unsupported Windows guest TLS instruction (bytes: 64 48 8b 03) (offset 0x747c663)
Input: F:\NHL 27\PPSA34063-app0\eboot.bin
built from main, commit:
cea1ef13Imported from boykopovar/AnyPS5. Originally posted by hashaam1217 on 2026-10-07T18:49:21Z.
Opened #1233 for
64 48 8b 03(mov rax, fs:[rbx]). It loads through any base/index register address, 32- or 64-bit, and moves the next instruction into the stub when the TLS instruction is shorter than the 5-byte jump (this one is 4 bytes).If you can build that branch and relink NHL 27, the next
FAIL:line (bytes and offset) would show the following form, if there is one.Imported from boykopovar/AnyPS5. Originally posted by lerrel129 on 2026-10-08T05:44:32Z.
F:\AnyPS5\build-pr1233\core\relinker>relinker.exe --windows --skip-sce-module "F:\NHL 27\PPSA34063-app0\eboot.bin" "F:\NHL 27 relinker\game.exe"
System: Windows; unused-filter=0
sce_module/sce_modules/prx processing: disabled (--skip-sce-module)
NID input: 9033 references
Unused NID filtering: disabled; filtered=0
NID total: 9033 -> 9033; filtered=0
FAIL: Unsupported Windows guest TLS instruction (bytes: 64 48 33 03) (offset 0x747c689)
Input: F:\NHL 27\PPSA34063-app0\eboot.bin
built from main, commit:
ace7999dImported from boykopovar/AnyPS5. Originally posted by lerrel129 on 2026-10-08T07:46:24Z.
I tested the current AnyPS5/relinker changes with NHL 27 PS5.
The original error from this issue:
FAIL: Unsupported Windows guest TLS instruction (offset 0x7479a98)is no longer reproduced with my newer locally built relinker.
The relinked NHL 27 executable gets past the TLS stage and reaches the NID/import stage. The current failure is:
FAIL: unresolved ELF import i-XwZjw0OOYfollowed by:
GetLastError: 127 - The specified procedure could not be found.So for NHL 27, the TLS blocker appears to be passed with the newer relinker changes, and the next blocker is unresolved ELF import/NID resolution.
I also created a small public repository containing the NHL 27 PS5 Frostbite extraction work and tools developed during this investigation:
https://github.com/lerrel129/nhl27-ps5-extractor
The repository contains the NHL 27-specific extraction tooling and documentation; it does not contain game files.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T08:26:28Z.
i-XwZjw0OOYissce::Json::MemAllocator::notifyError, whichlibSceJson2exports on main. Error 127 usually means thelibsnext togame.exeare older than the relinker, so use thelibsbuilt from the same commit. If it still fails, please open a new issue with the full FAIL line; this one stays for the TLS forms (#1233).Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T06:24:48Z.
Closing: #1651 handles the remaining ALU reads through
fs:[reg](64 48 33 03included), and the TLS stage passes on current main. For a later FAIL line, please open a new issue.