Relinker (Windows): OliSe Player (PPSA01153) stops at 'Empty import symbol name' on seven weak references with all-zero symbol entries #4437

Closed
opened 2026-10-12 11:23:05 +00:00 by orishamir · 0 comments
orishamir commented 2026-10-12 11:23:05 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by orishamir on 2026-10-12T11:23:05Z.


With --trap-sdk-syscall-stubs (#3804), OliSe Player (PPSA01153, catalog 02.001.000, sha256 matches the catalog, GPL-3.0) gets past the SDK syscall stubs of #2136. Its Windows relink then fails:

FAIL: Empty import symbol name (offset 0x18c5bb8)

Measured on main 3d8ffeb2 with eboot.bin and sce_module/libc.prx unwrapped. The relinker built on Windows (WinLibs GCC 15.2.0 r7, Release) fails this way. A relinker-only Linux build of the same commit fails the same way with --windows, and relinks the title without it.

What is at that offset. Seven relocations in the eboot point at dynamic symbols whose entries are all zero: no name, local, undefined, value 0, the same bytes as the null symbol at index 0.

GOT slot Relocation Symbol index
0x18c5bb8 R_X86_64_GLOB_DAT 247
0x18c60c8 R_X86_64_JUMP_SLOT 247
0x18c5e58, 0x18c5e60, 0x18c5e68, 0x18c5e70, 0x18c5e78 R_X86_64_GLOB_DAT 326 to 330

How the title uses them. Each slot is a weak reference that the code expects to be 0 when the function is absent:

  • 0x18c5bb8 is read in 16 places, each a cmp qword [rip+…], 0 followed by je over a call 0xc12fb0. That PLT stub jumps through 0x18c60c8, so the function is only called when the slot is not 0.
  • Each of 0x18c5e58 to 0x18c5e78 has a wrapper at 0xb2d060 to 0xb2d0e0 that jumps through the slot when it is not 0, and otherwise returns 0 (-1 for 0x18c5e70).

WindowsRelocationBuilder::Apply throws on the empty name before any of this matters. The Linux output keeps the seven as undefined GLOBAL FUNC imports with an empty name. I did not run the Linux build of the title, so I can't say what the host loader does with them.

None of the other 25 catalog titles I relink has a relocation against such an entry.

Should a relocation against an all-zero symbol entry resolve to 0, as one with symbol index 0 does? That is what this title's code is written for.

AI-assisted: yes (Claude Code Opus 5.5 xhigh)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5812867406 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/4437). Originally posted by [orishamir](https://github.com/orishamir) on 2026-10-12T11:23:05Z. --- With `--trap-sdk-syscall-stubs` (#3804), OliSe Player (PPSA01153, catalog 02.001.000, sha256 matches the catalog, GPL-3.0) gets past the SDK syscall stubs of #2136. Its Windows relink then fails: ``` FAIL: Empty import symbol name (offset 0x18c5bb8) ``` Measured on `main` 3d8ffeb2 with `eboot.bin` and `sce_module/libc.prx` unwrapped. The relinker built on Windows (WinLibs GCC 15.2.0 r7, Release) fails this way. A relinker-only Linux build of the same commit fails the same way with `--windows`, and relinks the title without it. **What is at that offset.** Seven relocations in the eboot point at dynamic symbols whose entries are all zero: no name, local, undefined, value 0, the same bytes as the null symbol at index 0. | GOT slot | Relocation | Symbol index | |---|---|---| | 0x18c5bb8 | `R_X86_64_GLOB_DAT` | 247 | | 0x18c60c8 | `R_X86_64_JUMP_SLOT` | 247 | | 0x18c5e58, 0x18c5e60, 0x18c5e68, 0x18c5e70, 0x18c5e78 | `R_X86_64_GLOB_DAT` | 326 to 330 | **How the title uses them.** Each slot is a weak reference that the code expects to be 0 when the function is absent: - 0x18c5bb8 is read in 16 places, each a `cmp qword [rip+…], 0` followed by `je` over a `call 0xc12fb0`. That PLT stub jumps through 0x18c60c8, so the function is only called when the slot is not 0. - Each of 0x18c5e58 to 0x18c5e78 has a wrapper at 0xb2d060 to 0xb2d0e0 that jumps through the slot when it is not 0, and otherwise returns 0 (-1 for 0x18c5e70). `WindowsRelocationBuilder::Apply` throws on the empty name before any of this matters. The Linux output keeps the seven as undefined `GLOBAL FUNC` imports with an empty name. I did not run the Linux build of the title, so I can't say what the host loader does with them. None of the other 25 catalog titles I relink has a relocation against such an entry. Should a relocation against an all-zero symbol entry resolve to 0, as one with symbol index 0 does? That is what this title's code is written for. AI-assisted: yes (Claude Code Opus 5.5 xhigh)
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#4437
No description provided.