fix(relinker): reject relocatable ELF conversion inputs #5148
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5148"
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 AaravMehta-07 on 2026-10-13T12:57:31Z.
What
Reject
ET_RELat the executable-conversion pipeline boundary before interpreting program headers or producing output. A relocatable object needs linking rather than executable-image conversion; the Linux-output path previously accepted the modified fixture and wrote an ELF as though conversion had succeeded. The Windows image path already rejects this object type.The ELF GABI header table distinguishes
ET_RELrelocatable objects from executable and shared-object images. The documented relinker input is a clean ELF executable. This guard rejects onlyET_REL, without introducing a whitelist that excludes SCE-specific executable types.Tested
Windows, MinGW-w64 GCC 15.2.0, Release relinker-only build with testing enabled. The Linux-output CLI test is Windows-hosted; it does not claim Linux runtime testing.
elf_header: passed in 15.4 seconds.mainat0f2683cb7. The standalone all-target relinker-only build succeeded and the complete current CTest suite passed 145/145 in 84.52 seconds.Depends onis none. I will rebase if #5116 lands first, and its author offered the corresponding rebase if this guard lands first.No PS5 hardware or commercial-title validation and no performance claim.
Checklist
main; no other open PR implements this ET_REL guard. The independent overlapping pipeline refactor in #5116 is coordinated above.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T13:14:37Z.
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/relinker/src/pipeline/RelinkerPipeline.cppL47Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T15:35:31Z.
Windows test: head
6f0f7c746merged onto currentmain60fb61870, together with 9 other open pull requests in one build (the merges were conflict-free); a failure would have been bisected per PR. Windows 10, MinGW GCC (WinLibs), Ninja Release,-j2: full build 0 errors; ctest for the tests this change adds or touches: elf_header passed;python tools/check_conventions.py --base upstream/mainpassed for the combined tree. I did not run the new tests againstmainwithout the change.AI-assisted (Claude Code).