fix(relinker): ignore unused guest note payloads #2088
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2088"
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 authurtabo-byte on 2026-10-09T07:45:20Z.
What
Ignore unused guest note payloads when reading an ELF. A non-loadable PT_NOTE or SHT_NOTE range can extend beyond the file without preventing conversion; ranges that contribute loaded data remain checked. This fixes conversion of 3D MiniGolf (PPSA03647) without weakening loadable-segment bounds checks.
Tested
Rebased onto main
f8c2f072. Subsequent main commits only change PR-intake workflows; the tested runtime/relinker source is unchanged. Windows, MinGW-w64 GCC 15.2.0, Release, relinker-only build: 41/41 CTest tests pass.tools/check_conventions.py --base origin/mainpasses. The run competed with a separate build;tls_function_coveragetook 40.32 seconds, and the suite took 43.18 seconds.The regression covers out-of-file segment and section notes, while malformed loadable ranges still fail. MGXAe independently tested the previous revision on Windows against main
d70b8998: 41/41 passed; restoring main's GuestImageReader madeguest_note_segmentsfail withELF range exceeds file: offset=0xb00, size=0x18, fileSize=0xa00.Linux and macOS were not rerun locally.
Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by MGXAe on 2026-10-09T13:17:26Z.
Tested on native Windows 11 (MinGW-w64 GCC 15.2.0, WinLibs r7): relinker-only Release build of this branch (
9dd37ec5) merged with currentmain(d70b8998), 41/41 ctest pass.With
main'sGuestImageReader.cppswapped in,guest_note_segmentsfails (ELF range exceeds file: offset=0xb00, size=0x18, fileSize=0xa00); with this change it passes.Imported from boykopovar/AnyPS5. Originally posted by authurtabo-byte on 2026-10-09T20:31:09Z.
Thanks @MGXAe for confirming the reproduction on main and running the CTest suite on native Windows MinGW. Verified all 41 relinker tests passing locally as well.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T22:07:27Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/relinker/CMakeLists.txtL235Pull request closed