fix(relinker): keep the interpreter path out of the scanned code #7996

Closed
javierUDP wants to merge 2 commits from upstream-pr/7996 into main
javierUDP commented 2026-10-19 17:09:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by javierUDP on 2026-10-19T17:09:46Z.


What

The code analysis trims an interpreter path from the start of an executable segment only for images that have a PT_SCE_DYNLIBDATA block. An executable without one keeps that path in the scanned range.

/libexec/ld-elf.so.1 then gets walked as code: a R_X86_64_RELATIVE relocation with addend 0 roots the control flow graph at the first byte of the segment, and the 0x64 of ld-elf decodes as an FS-prefixed instruction, which the Windows and macOS TLS rewriters refuse:

FAIL: Unsupported Windows guest TLS instruction (bytes: 64 2d 65 6c 66 2e) (offset 0x400a)

Linux output is unaffected because it keeps the guest %fs accesses. The trim now runs for both layouts, ending at the segment for an image without the block. This is the PT_INTERP item of the remaining PS4 work in #3093.

Tested

Apple M5, macOS 26.4, AppleClang 21.0.0, relinker-only build of current main.

The public OpenOrbis homebrew samples reproduce it, so no title dump is needed: samples-elf-llvm-18.zip from OpenOrbis-PS4-Toolchain v0.5.3 (GPL-3.0). Their executable segment starts with the interpreter path at vaddr 0, and they carry the addend-0 relocation.

--windows, 21 sample images main this branch
17 executables (graphics, SDL2, hello_world, piglet, font, input, networking, …) all refuse all convert
3 modules (libc, libSceFios2, right) convert convert

--macos refuses and converts the same way; graphics converts on all three targets with the change.

  • New interpreter_in_code test: an image without an SCE block whose executable segment begins with the interpreter path, reached through an addend-0 RELATIVE relocation. It fails on main with the message above and passes here, for --windows and --macos, with a second image that has no interpreter path as the control.
  • Full suite: 207/207 (206 before this test).
  • python3 tools/check_conventions.py --base origin/main passes.

No Linux or Windows host was available, so the converted images were not executed; the change only narrows what the analysis scans.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file: n/a
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source: n/a
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4924577533 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7996). Originally posted by [javierUDP](https://github.com/javierUDP) on 2026-10-19T17:09:46Z. --- ### What The code analysis trims an interpreter path from the start of an executable segment only for images that have a `PT_SCE_DYNLIBDATA` block. An executable without one keeps that path in the scanned range. `/libexec/ld-elf.so.1` then gets walked as code: a `R_X86_64_RELATIVE` relocation with addend 0 roots the control flow graph at the first byte of the segment, and the `0x64` of `ld-elf` decodes as an FS-prefixed instruction, which the Windows and macOS TLS rewriters refuse: ``` FAIL: Unsupported Windows guest TLS instruction (bytes: 64 2d 65 6c 66 2e) (offset 0x400a) ``` Linux output is unaffected because it keeps the guest `%fs` accesses. The trim now runs for both layouts, ending at the segment for an image without the block. This is the `PT_INTERP` item of the remaining PS4 work in #3093. ### Tested Apple M5, macOS 26.4, AppleClang 21.0.0, relinker-only build of current `main`. The public OpenOrbis homebrew samples reproduce it, so no title dump is needed: `samples-elf-llvm-18.zip` from [OpenOrbis-PS4-Toolchain v0.5.3](https://github.com/OpenOrbis/OpenOrbis-PS4-Toolchain/releases/tag/v0.5.3) (GPL-3.0). Their executable segment starts with the interpreter path at vaddr 0, and they carry the addend-0 relocation. | `--windows`, 21 sample images | `main` | this branch | | --- | --- | --- | | 17 executables (`graphics`, `SDL2`, `hello_world`, `piglet`, `font`, `input`, `networking`, …) | all refuse | **all convert** | | 3 modules (`libc`, `libSceFios2`, `right`) | convert | convert | `--macos` refuses and converts the same way; `graphics` converts on all three targets with the change. - New `interpreter_in_code` test: an image without an SCE block whose executable segment begins with the interpreter path, reached through an addend-0 RELATIVE relocation. It fails on `main` with the message above and passes here, for `--windows` and `--macos`, with a second image that has no interpreter path as the control. - Full suite: 207/207 (206 before this test). - `python3 tools/check_conventions.py --base origin/main` passes. No Linux or Windows host was available, so the converted images were not executed; the change only narrows what the analysis scans. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical debt file: n/a - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source: n/a - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-19 17:33:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T17:33:36Z.


Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/relinker/CMakeLists.txt
PR 6044 core/relinker/CMakeLists.txt
PR 6204 core/relinker/CMakeLists.txt
PR 6618 core/relinker/CMakeLists.txt
core/relinker/relinker/src/analysis/CodeInstructionCollector.cpp
PR 6713 core/relinker/CMakeLists.txt
PR 6879 core/relinker/CMakeLists.txt
PR 6977 core/relinker/CMakeLists.txt
core/relinker/relinker/src/analysis/CodeInstructionCollector.cpp
PR 7037 core/relinker/relinker/src/analysis/CodeInstructionCollector.cpp
PR 7173 core/relinker/CMakeLists.txt
PR 7417 core/relinker/CMakeLists.txt
PR 7531 core/relinker/CMakeLists.txt
PR 7532 core/relinker/CMakeLists.txt
PR 7704 core/relinker/CMakeLists.txt
PR 7837 core/relinker/CMakeLists.txt
PR 8063 core/relinker/CMakeLists.txt
PR 8076 core/relinker/relinker/src/analysis/CodeInstructionCollector.cpp
PR 8118 core/relinker/CMakeLists.txt
PR 8142 core/relinker/CMakeLists.txt
PR 8251 core/relinker/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273268360 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7996#issuecomment-6273268360). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T17:33:36Z. --- <!-- pr-overlap --> Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/relinker/CMakeLists.txt` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/relinker/CMakeLists.txt` | | [PR 6204](https://www.github.com/boykopovar/AnyPS5/pull/6204) | `core/relinker/CMakeLists.txt` | | [PR 6618](https://www.github.com/boykopovar/AnyPS5/pull/6618) | `core/relinker/CMakeLists.txt`<br>`core/relinker/relinker/src/analysis/CodeInstructionCollector.cpp` | | [PR 6713](https://www.github.com/boykopovar/AnyPS5/pull/6713) | `core/relinker/CMakeLists.txt` | | [PR 6879](https://www.github.com/boykopovar/AnyPS5/pull/6879) | `core/relinker/CMakeLists.txt` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/relinker/CMakeLists.txt`<br>`core/relinker/relinker/src/analysis/CodeInstructionCollector.cpp` | | [PR 7037](https://www.github.com/boykopovar/AnyPS5/pull/7037) | `core/relinker/relinker/src/analysis/CodeInstructionCollector.cpp` | | [PR 7173](https://www.github.com/boykopovar/AnyPS5/pull/7173) | `core/relinker/CMakeLists.txt` | | [PR 7417](https://www.github.com/boykopovar/AnyPS5/pull/7417) | `core/relinker/CMakeLists.txt` | | [PR 7531](https://www.github.com/boykopovar/AnyPS5/pull/7531) | `core/relinker/CMakeLists.txt` | | [PR 7532](https://www.github.com/boykopovar/AnyPS5/pull/7532) | `core/relinker/CMakeLists.txt` | | [PR 7704](https://www.github.com/boykopovar/AnyPS5/pull/7704) | `core/relinker/CMakeLists.txt` | | [PR 7837](https://www.github.com/boykopovar/AnyPS5/pull/7837) | `core/relinker/CMakeLists.txt` | | [PR 8063](https://www.github.com/boykopovar/AnyPS5/pull/8063) | `core/relinker/CMakeLists.txt` | | [PR 8076](https://www.github.com/boykopovar/AnyPS5/pull/8076) | `core/relinker/relinker/src/analysis/CodeInstructionCollector.cpp` | | [PR 8118](https://www.github.com/boykopovar/AnyPS5/pull/8118) | `core/relinker/CMakeLists.txt` | | [PR 8142](https://www.github.com/boykopovar/AnyPS5/pull/8142) | `core/relinker/CMakeLists.txt` | | [PR 8251](https://www.github.com/boykopovar/AnyPS5/pull/8251) | `core/relinker/CMakeLists.txt` |
wachi35676 commented 2026-10-19 23:18:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-19T23:18:09Z.


Verdict: confirmed on Windows and Linux, with one edge case below.

Environment: Windows 11 Home 10.0.26300, Ryzen 5 9600X, WinLibs GCC 15.2.0 r7, relinker-only Release build. This PR was merged onto main 9127ea36d. Linux: WSL Ubuntu 24.04, GCC 13.3.

  • OpenOrbis samples-elf-llvm-18.zip from the official v0.5.3 release, all 21 ELFs, converted with relinker --skip-sce-module and --windows or --macos:
    • The 17 executables are refused on main with Unsupported Windows guest TLS instruction (bytes: 64 2d 65 6c 66 2e) (offset 0x400a), or the macOS equivalent. All of them convert with this PR, on both targets.
    • The 3 modules (libc, libSceFios2, right) convert on both, and their outputs are byte-identical to main.
  • PS5 homebrew without PT_INTERP: PPSA99005, PPSA47402, PPSA99581, and PPSA99995 with its 16 Wine modules. Relinked with --windows --to-intel, --macos --to-rosetta and Linux --to-intel, all 12 output sets are byte-identical to main.
  • Negative control: with only CodeInstructionCollector.cpp reverted to main, interpreter_in_code fails with Unsupported Windows guest TLS instruction (bytes: 64 2d 65 6c 66 2e) (offset 0x100a).
  • ctest: Windows 213/213, after a serial rerun of 10 tests that timed out under -j4 because of host load. WSL 218/218.

Edge case: trimToCode sets the start of the analyzed code to the end of any PT_INTERP that lies inside the executable segment, not only one at its start. Before this PR, only SCE images got that trim. Now an image without an SCE block whose PT_INTERP follows the code in the same executable segment loses the code in front of it. Probe: the make_image("register", "unwind") image from test_tls_function_coverage.py, plus a sixth program header PT_INTERP at 0x1f00 (size 21, /libexec/ld-elf.so.1) inside the executable segment 0x1000-0x2000, with the code at 0x1200.

--windows main this PR
no PT_INTERP rc 0 rc 0
PT_INTERP at segment start 0x1000 rc 0 rc 0
PT_INTERP at 0x1f00, after the code rc 0 rc 2 Code analysis: invalid function range (offset 0x1200)

It fails loudly, and linkers normally put .interp before .text. Trimming only when the interpreter range starts at the segment start would avoid it.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6279481638 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7996#issuecomment-6279481638). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-19T23:18:09Z. --- Verdict: confirmed on Windows and Linux, with one edge case below. Environment: Windows 11 Home 10.0.26300, Ryzen 5 9600X, WinLibs GCC 15.2.0 r7, relinker-only Release build. This PR was merged onto `main` 9127ea36d. Linux: WSL Ubuntu 24.04, GCC 13.3. - OpenOrbis `samples-elf-llvm-18.zip` from the official v0.5.3 release, all 21 ELFs, converted with `relinker --skip-sce-module` and `--windows` or `--macos`: - The 17 executables are refused on `main` with `Unsupported Windows guest TLS instruction (bytes: 64 2d 65 6c 66 2e) (offset 0x400a)`, or the macOS equivalent. All of them convert with this PR, on both targets. - The 3 modules (`libc`, `libSceFios2`, `right`) convert on both, and their outputs are byte-identical to `main`. - PS5 homebrew without `PT_INTERP`: PPSA99005, PPSA47402, PPSA99581, and PPSA99995 with its 16 Wine modules. Relinked with `--windows --to-intel`, `--macos --to-rosetta` and Linux `--to-intel`, all 12 output sets are byte-identical to `main`. - Negative control: with only `CodeInstructionCollector.cpp` reverted to `main`, `interpreter_in_code` fails with `Unsupported Windows guest TLS instruction (bytes: 64 2d 65 6c 66 2e) (offset 0x100a)`. - `ctest`: Windows 213/213, after a serial rerun of 10 tests that timed out under `-j4` because of host load. WSL 218/218. Edge case: `trimToCode` sets the start of the analyzed code to the end of any `PT_INTERP` that lies inside the executable segment, not only one at its start. Before this PR, only SCE images got that trim. Now an image without an SCE block whose `PT_INTERP` follows the code in the same executable segment loses the code in front of it. Probe: the `make_image("register", "unwind")` image from `test_tls_function_coverage.py`, plus a sixth program header `PT_INTERP` at 0x1f00 (size 21, `/libexec/ld-elf.so.1`) inside the executable segment 0x1000-0x2000, with the code at 0x1200. | `--windows` | `main` | this PR | |---|---|---| | no `PT_INTERP` | rc 0 | rc 0 | | `PT_INTERP` at segment start 0x1000 | rc 0 | rc 0 | | `PT_INTERP` at 0x1f00, after the code | rc 0 | rc 2 `Code analysis: invalid function range (offset 0x1200)` | It fails loudly, and linkers normally put `.interp` before `.text`. Trimming only when the interpreter range starts at the segment start would avoid it. AI-assisted: yes (Claude Code); results above were run on this machine.
javierUDP commented 2026-10-19 23:51:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by javierUDP on 2026-10-19T23:51:38Z.


Confirmed and fixed in 32b2a9196. You are right, and the probe reproduces here: Apple M5, macOS 26.4, AppleClang 21.0.0, relinker-only build.

--windows, make_image("register", "unwind") main 7db5ba1d7 32b2a9196
no PT_INTERP rc 0 rc 0 rc 0
PT_INTERP at the segment start rc 0 rc 0 rc 0
PT_INTERP at 0x1f00, after the code rc 0 rc 2 rc 0

trimToCode now takes an interpreter only when it starts the segment, and the SCE path keeps taking any interpreter inside the scanned range, so nothing changes for images with an SCE block. I kept it to that rather than reordering the scan, since the trim is only meant to skip a path that precedes the code.

interpreter_in_code gained a third image whose PT_INTERP follows the code. It fails on 7db5ba1d7 with Code analysis: no code entry points and passes on 32b2a9196, so the case is covered from here on. The suite is 207/207 and the 17 OpenOrbis executables still convert on --windows and --macos.

Thanks for the Windows and Linux runs, and for the byte-identical check on the PS5 homebrew: that covers the ground I could not, since I have neither host.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6279922407 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7996#issuecomment-6279922407). Originally posted by [javierUDP](https://github.com/javierUDP) on 2026-10-19T23:51:38Z. --- Confirmed and fixed in `32b2a9196`. You are right, and the probe reproduces here: Apple M5, macOS 26.4, AppleClang 21.0.0, relinker-only build. | `--windows`, `make_image("register", "unwind")` | `main` | `7db5ba1d7` | `32b2a9196` | | --- | --- | --- | --- | | no `PT_INTERP` | rc 0 | rc 0 | rc 0 | | `PT_INTERP` at the segment start | rc 0 | rc 0 | rc 0 | | `PT_INTERP` at 0x1f00, after the code | rc 0 | **rc 2** | rc 0 | `trimToCode` now takes an interpreter only when it starts the segment, and the SCE path keeps taking any interpreter inside the scanned range, so nothing changes for images with an SCE block. I kept it to that rather than reordering the scan, since the trim is only meant to skip a path that precedes the code. `interpreter_in_code` gained a third image whose `PT_INTERP` follows the code. It fails on `7db5ba1d7` with `Code analysis: no code entry points` and passes on `32b2a9196`, so the case is covered from here on. The suite is 207/207 and the 17 OpenOrbis executables still convert on `--windows` and `--macos`. Thanks for the Windows and Linux runs, and for the byte-identical check on the PS5 homebrew: that covers the ground I could not, since I have neither host.
wachi35676 commented 2026-10-20 00:23:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-20T00:23:56Z.


Re-tested 32b2a9196. The edge case is fixed, and nothing else moved.

Environment: Windows 11 Home 10.0.26300, Ryzen 5 9600X, WinLibs GCC 15.2.0 r7, relinker-only Release build. The PR is merged onto main 3aa35dc01, and that main is the baseline. Linux: WSL Ubuntu 24.04, GCC 13.3, -DBUILD_TESTING=ON.

Same probe as before: make_image("register", "unwind") plus a PT_INTERP (size 21, /libexec/ld-elf.so.1), converted with --skip-sce-module --windows.

--windows main 3aa35dc01 7db5ba1d7 32b2a9196
no PT_INTERP rc 0 rc 0 rc 0
PT_INTERP at the segment start 0x1000 rc 0 rc 0 rc 0
PT_INTERP at 0x1f00, after the code rc 0 rc 2 invalid function range (offset 0x1200) rc 0

In every rc 0 case, the original TLS bytes at 0x1240 appear once in the output, as they do on main.

  • OpenOrbis v0.5.3 samples-elf-llvm-18.zip, --skip-sce-module: all 17 executables convert with --windows and with --macos. On main they still fail with Unsupported Windows guest TLS instruction (bytes: 64 2d 65 6c 66 2e) (offset 0x400a). The 3 modules give the same bytes as main. All 40 outputs are also byte-identical to the ones from 7db5ba1d7.
  • PS5 homebrew without PT_INTERP (PPSA99005, PPSA47402, PPSA99581, and PPSA99995 with its Wine modules): relinked with --windows --to-intel, --macos --to-rosetta and Linux --to-intel. All 12 output sets are byte-identical to main.
  • Negative control: with only CodeInstructionCollector.cpp set back to 7db5ba1d7, interpreter_in_code fails on the new trailing image with Code analysis: no code entry points. It passes on 32b2a9196.
  • ctest, Windows: 213/214 under -j4. guest_none_relocations timed out under host load and passed on a serial rerun, so 214/214.
  • ctest, WSL: 218/219. shader_cache_runtime_sources failed because its nested cmake configure timed out after 15 s while other work was loading the host. This PR does not touch that test. It passed twice on a rerun, so 219/219.
  • tools/check_conventions.py: passes.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6280353194 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7996#issuecomment-6280353194). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-20T00:23:56Z. --- Re-tested `32b2a9196`. The edge case is fixed, and nothing else moved. Environment: Windows 11 Home 10.0.26300, Ryzen 5 9600X, WinLibs GCC 15.2.0 r7, relinker-only Release build. The PR is merged onto `main` 3aa35dc01, and that `main` is the baseline. Linux: WSL Ubuntu 24.04, GCC 13.3, `-DBUILD_TESTING=ON`. Same probe as before: `make_image("register", "unwind")` plus a `PT_INTERP` (size 21, `/libexec/ld-elf.so.1`), converted with `--skip-sce-module --windows`. | `--windows` | `main` 3aa35dc01 | `7db5ba1d7` | `32b2a9196` | |---|---|---|---| | no `PT_INTERP` | rc 0 | rc 0 | rc 0 | | `PT_INTERP` at the segment start 0x1000 | rc 0 | rc 0 | rc 0 | | `PT_INTERP` at 0x1f00, after the code | rc 0 | rc 2 `invalid function range (offset 0x1200)` | rc 0 | In every rc 0 case, the original TLS bytes at 0x1240 appear once in the output, as they do on `main`. - OpenOrbis v0.5.3 `samples-elf-llvm-18.zip`, `--skip-sce-module`: all 17 executables convert with `--windows` and with `--macos`. On `main` they still fail with `Unsupported Windows guest TLS instruction (bytes: 64 2d 65 6c 66 2e) (offset 0x400a)`. The 3 modules give the same bytes as `main`. All 40 outputs are also byte-identical to the ones from `7db5ba1d7`. - PS5 homebrew without `PT_INTERP` (PPSA99005, PPSA47402, PPSA99581, and PPSA99995 with its Wine modules): relinked with `--windows --to-intel`, `--macos --to-rosetta` and Linux `--to-intel`. All 12 output sets are byte-identical to `main`. - Negative control: with only `CodeInstructionCollector.cpp` set back to `7db5ba1d7`, `interpreter_in_code` fails on the new `trailing` image with `Code analysis: no code entry points`. It passes on `32b2a9196`. - `ctest`, Windows: 213/214 under `-j4`. `guest_none_relocations` timed out under host load and passed on a serial rerun, so 214/214. - `ctest`, WSL: 218/219. `shader_cache_runtime_sources` failed because its nested `cmake` configure timed out after 15 s while other work was loading the host. This PR does not touch that test. It passed twice on a rerun, so 219/219. - `tools/check_conventions.py`: passes. AI-assisted: yes (Claude Code); results above were run on this machine.
javierUDP commented 2026-10-20 04:43:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by javierUDP on 2026-10-20T04:43:35Z.


@wachi35676 thanks for the second round, and for diffing all 40 outputs against 7db5ba1d7 byte for byte: that is what shows the edge-case fix changed nothing else. The Windows and Linux runs and the PS5 homebrew checks cover the ground I cannot, since I have neither host.

On the overlap notice: I checked the one pull request in it that shares CodeInstructionCollector.cpp, #6618. It does not merge into main on its own. Merged into main 49fd13a74 by itself it conflicts in CodeInstructionCollector.cpp and RelinkerPipeline.cpp, the same two files it conflicts in when merged on top of this branch, and this branch does not touch RelinkerPipeline.cpp at all. So the conflict is between #6618 and main rather than with this pull request, and it needs a rebase either way.

The other pull requests in the notice share only core/relinker/CMakeLists.txt, where this branch adds one add_test block next to the other relinker Python tests.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6283565884 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7996#issuecomment-6283565884). Originally posted by [javierUDP](https://github.com/javierUDP) on 2026-10-20T04:43:35Z. --- @wachi35676 thanks for the second round, and for diffing all 40 outputs against `7db5ba1d7` byte for byte: that is what shows the edge-case fix changed nothing else. The Windows and Linux runs and the PS5 homebrew checks cover the ground I cannot, since I have neither host. On the overlap notice: I checked the one pull request in it that shares `CodeInstructionCollector.cpp`, #6618. It does not merge into `main` on its own. Merged into `main` `49fd13a74` by itself it conflicts in `CodeInstructionCollector.cpp` and `RelinkerPipeline.cpp`, the same two files it conflicts in when merged on top of this branch, and this branch does not touch `RelinkerPipeline.cpp` at all. So the conflict is between #6618 and `main` rather than with this pull request, and it needs a rebase either way. The other pull requests in the notice share only `core/relinker/CMakeLists.txt`, where this branch adds one `add_test` block next to the other relinker Python tests.
oneandonlydean commented 2026-10-20 16:39:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T16:39:43Z.


Thanks. This now conflicts with main in core/relinker/relinker/src/analysis/CodeInstructionCollector.cpp, after #8166 (which changes how the code roots and the syscall scan treat data between PS4 unwind functions) merged today. Could you rebase onto current main, keeping both rules (the new SCE gap handling and your interpreter trim for images without PT_SCE_DYNLIBDATA)? Once it merges cleanly we'll run the relinker CI and a relink-identity check on our test titles, since this path runs for PS5 executables too.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6296036800 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7996#issuecomment-6296036800). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T16:39:43Z. --- Thanks. This now conflicts with `main` in `core/relinker/relinker/src/analysis/CodeInstructionCollector.cpp`, after #8166 (which changes how the code roots and the syscall scan treat data between PS4 unwind functions) merged today. Could you rebase onto current `main`, keeping both rules (the new SCE gap handling and your interpreter trim for images without `PT_SCE_DYNLIBDATA`)? Once it merges cleanly we'll run the relinker CI and a relink-identity check on our test titles, since this path runs for PS5 executables too.
javierUDP commented 2026-10-20 17:59:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by javierUDP on 2026-10-20T17:59:37Z.


@oneandonlydean rebased onto current main as you asked, keeping both rules: the sceFunctions and merged unwind ranges from #8166, and the interpreter trim for images without PT_SCE_DYNLIBDATA.

This pull request closed when I republished its branch, and GitHub will not reopen it, so the rebased work is in #8599. Apologies for the churn — the two commits and the discussion here are unchanged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6297597101 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7996#issuecomment-6297597101). Originally posted by [javierUDP](https://github.com/javierUDP) on 2026-10-20T17:59:37Z. --- @oneandonlydean rebased onto current `main` as you asked, keeping both rules: the `sceFunctions` and merged unwind ranges from #8166, and the interpreter trim for images without `PT_SCE_DYNLIBDATA`. This pull request closed when I republished its branch, and GitHub will not reopen it, so the rebased work is in #8599. Apologies for the churn — the two commits and the discussion here are unchanged.

Pull request closed

Sign in to join this conversation.
No reviewers
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!7996
No description provided.