Repository navigation
fix(relinker): accept absolute symbols in guest modules - #698
Merged
oneandonlydean merged 1 commit intoOct 6, 2026
Merged
Conversation
Guest modules may define symbols in SHN_ABS (0xfff1), for example the 151 library marker symbols of PPSA12544's Il2cppUserAssemblies.prx. The reader no longer rejects them or checks their value as a mapped address, relocations against them write the absolute value without a base relocation, and they are not exported: a PE export is an RVA, so an import of one fails at startup as an unresolved import. Other special sections are still rejected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 tasks done
This was referenced Oct 5, 2026
This was referenced Oct 5, 2026
Contributor
Author
|
On the overlap note: #672 and #684 are different topics (host prx references on Linux, Windows import module binding). The overlap is neighbouring lines in |
fable-void
added a commit
to fable-void/AnyPS5
that referenced
this pull request
Oct 11, 2026
boykopovar#698 taught the reader, the module builder and the Windows writer to resolve relocations against SHN_ABS symbols and to leave them out of the exports, but the macOS writer still threw "Unsupported guest export section" for them. PPSA12544 bundles modules with such an export (RKDbTdN8TO0), so --macos stopped before writing anything. The macOS writer now resolves a relocation against an absolute symbol to its value plus the addend, without a rebase, and skips absolute symbols when exporting, as the Windows writer does. guest_absolute_symbols covers the macOS output too. AI-assisted: yes
fable-void
added a commit
to fable-void/AnyPS5
that referenced
this pull request
Oct 11, 2026
boykopovar#698 taught the reader, the module builder and the Windows writer to resolve relocations against SHN_ABS symbols and to leave them out of the exports, but the macOS writer still threw "Unsupported guest export section" for them. PPSA12544 bundles modules with such an export (RKDbTdN8TO0), so --macos stopped before writing anything. The macOS writer now resolves a relocation against an absolute symbol to its value plus the addend, without a rebase, and skips absolute symbols when exporting, as the Windows writer does. guest_absolute_symbols covers the macOS output too. AI-assisted: yes
9 tasks done
This was referenced Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Guest modules may define symbols in
SHN_ABS(0xfff1). PPSA12544 (Hollow Knight: Silksong) bundlesIl2cppUserAssemblies.prxwith 151 of them (<NID>#K#A,STB_GLOBAL,STT_NOTYPE, value 1). The relinker failed on the first one withUnsupported special symbol section.GuestImageReader: anSHN_ABSsymbol is accepted and its value is not checked as a mapped address. Other special sections (SHN_COMMON, ...) are still rejected.WindowsGuestModuleWriter:R_X86_64_64/GLOB_DAT/JUMP_SLOTagainst anSHN_ABSsymbol writevalue + addendwith no base relocation.SHN_ABSsymbols are not exported on Windows and not entered in the guest export map: a PE export is an RVA, so an import of one fails at startup as an unresolved import. No module of PPSA12544 imports any of the 151. On Linux the dynamic symbol table is kept, so ld.so resolves them natively.guest_absolute_symbols: a guest module with an exported absolute symbol and a relocation against it relinks for Linux and Windows (Windows output holds the absolute value, Linux output keeps the relocation against theSHN_ABSsymbol);SHN_COMMONstill fails.Tested
Windows 11, WinLibs GCC 15.2.0 r7, Ryzen 7 9800X3D, Radeon RX 9070 XT.
ctest: 287/289 passed, includingguest_absolute_symbols.agc_driver_lds_atomics64andagc_driver_vopc_compare_tablefail on this machine; they run on the Vulkan device and do not touch the relinker.Il2cppUserAssemblies.prx) relink; at startup only unimplemented exports remain unresolved (separate PR).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code