mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-04 13:07:32 +00:00
Some homebrew toolchains emit an eboot whose read-only PT_LOAD runs over the GNU_RELRO start of the following read-write PT_LOAD, with byte-identical content over the overlap. The relinker refused every such title with "Overlapping PT_LOAD memory ranges" on both the Linux and Windows paths (Photo Splat VR PPSA99770 #12183, FoxHollow PPSA99573, WWE 13 PPSA92013). When an earlier PT_LOAD's tail overlaps a later one, the overlapping bytes are identical, and the overlap does not extend past the later segment, trim the earlier segment to end where the later one starts so the later segment owns the shared range. On Linux the preserved PT_GNU_RELRO makes that range read-only after relocation, matching the earlier read-only mapping; the Windows image builder has no RELRO step, so the shared range stays writable (noted in docs/dev/debt/relinker.md). Overlaps whose bytes differ (the #10564 case), that extend past the later segment, or that share a start address with it are still refused on every target; the last case would otherwise trim the earlier segment to zero length. test_executable_segments.py covers the accepted tail overlap and all three refused cases. Co-Authored-By: Claude Opus 4.8 <[email protected]>