feat(relinker): make PT_SCE_RELRO read-only in macOS output #18373

Open
SHOnnay wants to merge 6 commits from upstream-pr/18373 into main
SHOnnay commented 2026-11-11 12:37:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SHOnnay on 2026-11-11T12:37:55Z.


What

macOS output left every PT_SCE_RELRO range writable after relocation (debt, "macOS entry stub has no equivalent"). It now makes those pages read-only after dyld's fixups and before guest code runs, as PT_GNU_RELRO does on default Linux output.

  • Ranges. The ranges are the PT_GNU_RELRO headers that ElfReader produces from PT_SCE_RELRO, filtered by the same writable-load coverage check the Linux layout uses. hasWritableLoadCoverage moves out of the anonymous namespace as HasWritableLoadCoverage. Pages are rounded as glibc's _dl_protect_relro rounds them: start and end both rounded down to 4 KiB, so a range under one page protects nothing.
  • Fail closed. The writer throws when a range is not page-congruent in the image, or when a page is not in a writable Mach-O segment.
  • Call. _mprotect is bound into a new __APS5DATA slot. Each range gets mprotect(start, size, PROT_READ), and a non-zero return reaches ud2.
  • Executables. A pre-entry stub in __APS5TEXT runs after the --trace-imports prologue, so traced slots inside RELRO are written before protection. It then jumps to the existing entry stub. The stub saves rdi, rsi, rdx and rcx and keeps the call 16-byte aligned. The __TEXT jump and the patching of the trace prologue's exit become one pre-entry chain.
  • Guest modules (dylibs). The calls run in the __mod_init_func stub after TLS import stores and before module_start and DT_INIT_ARRAY. That is the order ld.so uses for PT_GNU_RELRO.
  • Debt. The entry now lists only Windows and Linux --lazy-binding output.

Unlike Linux output, macOS output protects every range. Linux throws on more than one range because the loader tracks only one PT_GNU_RELRO; here each range gets its own call.

Windows (VirtualProtect) is not part of this PR because it cannot be run on this machine.

Tested

macOS 27 on Apple M1. Relinker-only Release build, AppleClang. Relinked x86-64 output ran under Rosetta.

  • ctest --test-dir build-relinker -j 4: 779 of 779 passed, including the new macos_sce_relro.
  • New macos_sce_relro executable cases. The guest entry jumps through a rebased slot inside the RELRO range, so exit 42 shows dyld's rebase landed before protection. Results:
    • Standalone and covered RELRO, read only: exit 42.
    • Store into RELRO before the jump: SIGBUS.
    • Store into a separate non-RELRO RW load: exit 42, so protection is not wider than the range.
    • GOT moved into a RELRO page: untraced exit 11, --trace-imports with a replacing hook exit 77, --trace-imports plus a store into RELRO SIGBUS.
  • New macos_sce_relro module case. A guest module with RELRO over its data page is loaded with dlopen. Read returns 7 through the rebased slot; Write faults.
  • Structure checks (all hosts). _mprotect is bound when a protectable range exists. It is not bound with no RELRO, or with RELRO shorter than a page. Hosts that cannot run x86-64 Mach-O check only this; macOS CI asserts that it executes.
  • On main 1b485ff745, same machine:
    • The test fails at its first structure check.
    • With the structure check bypassed, the runtime assertions fail too: the executable store into RELRO exits 42, and the module Write returns 9. Both writes succeed.
  • Not tested: Intel Mac hardware, Linux and Windows hosts (they run the structure checks only), and real titles.
$ python3 tools/check_conventions.py --base upstream/main
All conventions checks passed.
$ python3 tools/pr_overlap.py --branch feat/macos-sce-relro
overlap check failed closed; manually compare every reported PR branch before opening this one

pr_overlap.py found no overlap among the 49 pull requests it could merge. It could not compare 20 that conflict with main. I read the RELRO, mprotect and entry stub hunks of each:

  • #11628 and #11689 change the Windows entry stub.
  • #15642 adds parser tests for PT_SCE_RELRO errors.
  • #10792 and #12678 mention mprotect in unrelated code.
  • #10861 changes other parts of MacOsImage.cpp.

None protects RELRO on macOS. A rebase conflict in MacOsImage.cpp with #10861 is possible.

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
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5259588665 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18373). Originally posted by [SHOnnay](https://github.com/SHOnnay) on 2026-11-11T12:37:55Z. --- ### What macOS output left every `PT_SCE_RELRO` range writable after relocation ([debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/debt/relinker.md), "macOS entry stub has no equivalent"). It now makes those pages read-only after dyld's fixups and before guest code runs, as `PT_GNU_RELRO` does on default Linux output. - **Ranges.** The ranges are the `PT_GNU_RELRO` headers that `ElfReader` produces from `PT_SCE_RELRO`, filtered by the same writable-load coverage check the Linux layout uses. `hasWritableLoadCoverage` moves out of the anonymous namespace as `HasWritableLoadCoverage`. Pages are rounded as glibc's `_dl_protect_relro` rounds them: start and end both rounded down to 4 KiB, so a range under one page protects nothing. - **Fail closed.** The writer throws when a range is not page-congruent in the image, or when a page is not in a writable Mach-O segment. - **Call.** `_mprotect` is bound into a new `__APS5DATA` slot. Each range gets `mprotect(start, size, PROT_READ)`, and a non-zero return reaches `ud2`. - **Executables.** A pre-entry stub in `__APS5TEXT` runs after the `--trace-imports` prologue, so traced slots inside RELRO are written before protection. It then jumps to the existing entry stub. The stub saves `rdi`, `rsi`, `rdx` and `rcx` and keeps the call 16-byte aligned. The `__TEXT` jump and the patching of the trace prologue's exit become one pre-entry chain. - **Guest modules (dylibs).** The calls run in the `__mod_init_func` stub after TLS import stores and before `module_start` and `DT_INIT_ARRAY`. That is the order ld.so uses for `PT_GNU_RELRO`. - **Debt.** The entry now lists only Windows and Linux `--lazy-binding` output. Unlike Linux output, macOS output protects every range. Linux throws on more than one range because the loader tracks only one `PT_GNU_RELRO`; here each range gets its own call. Windows (`VirtualProtect`) is not part of this PR because it cannot be run on this machine. ### Tested macOS 27 on Apple M1. Relinker-only Release build, AppleClang. Relinked x86-64 output ran under Rosetta. - **`ctest --test-dir build-relinker -j 4`:** 779 of 779 passed, including the new `macos_sce_relro`. - **New `macos_sce_relro` executable cases.** The guest entry jumps through a rebased slot inside the RELRO range, so exit 42 shows dyld's rebase landed before protection. Results: - Standalone and covered RELRO, read only: exit 42. - Store into RELRO before the jump: SIGBUS. - Store into a separate non-RELRO RW load: exit 42, so protection is not wider than the range. - GOT moved into a RELRO page: untraced exit 11, `--trace-imports` with a replacing hook exit 77, `--trace-imports` plus a store into RELRO SIGBUS. - **New `macos_sce_relro` module case.** A guest module with RELRO over its data page is loaded with `dlopen`. `Read` returns 7 through the rebased slot; `Write` faults. - **Structure checks (all hosts).** `_mprotect` is bound when a protectable range exists. It is not bound with no RELRO, or with RELRO shorter than a page. Hosts that cannot run x86-64 Mach-O check only this; macOS CI asserts that it executes. - **On `main` `1b485ff745`, same machine:** - The test fails at its first structure check. - With the structure check bypassed, the runtime assertions fail too: the executable store into RELRO exits 42, and the module `Write` returns 9. Both writes succeed. - **Not tested:** Intel Mac hardware, Linux and Windows hosts (they run the structure checks only), and real titles. ```text $ python3 tools/check_conventions.py --base upstream/main All conventions checks passed. $ python3 tools/pr_overlap.py --branch feat/macos-sce-relro overlap check failed closed; manually compare every reported PR branch before opening this one ``` `pr_overlap.py` found no overlap among the 49 pull requests it could merge. It could not compare 20 that conflict with `main`. I read the RELRO, `mprotect` and entry stub hunks of each: - #11628 and #11689 change the Windows entry stub. - #15642 adds parser tests for `PT_SCE_RELRO` errors. - #10792 and #12678 mention `mprotect` in unrelated code. - #10861 changes other parts of `MacOsImage.cpp`. None protects RELRO on macOS. A rebase conflict in `MacOsImage.cpp` with #10861 is possible. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-11-12 14:44:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T14:44:28Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this; the points below are optional.

What I ran

Head 2cbb4d05dc20e16f460d964d919dfddabbb7adab, base main. Read-only review of the diff and of the repository at the head, through repo_read.py. No build, no test run, no write to the repository.

Commands
python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 1 12
python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 84 100
python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 140 156
python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 490 530
python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 540 625
python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 690 765
python3 repo_read.py cat core/relinker/elfpatcher/src/general/ProgramHeaderLayoutBuilder.cpp 1 20
python3 repo_read.py search HasWritableLoadCoverage core/relinker
python3 repo_read.py search "def guest_module" core/relinker/relinker/tests
python3 repo_read.py search "def run_binary" core/relinker/relinker/tests
python3 repo_read.py search "def library" core/relinker/relinker/tests
python3 repo_read.py search "def executable" core/relinker/relinker/tests
python3 repo_read.py search "def main_fixture" core/relinker/relinker/tests
python3 repo_read.py search "class MachO" core/relinker/relinker/tests
python3 repo_read.py search "PT_SCE_RELRO =" core/relinker/relinker/tests
python3 repo_read.py search "def fixture" core/relinker/relinker/tests/test_sce_relro.py
python3 repo_read.py search "HOOK =" core/relinker/relinker/tests/test_macos_trace_imports.py
python3 repo_read.py search "dyld_info" core/relinker/relinker/tests/test_macos_output.py
python3 repo_read.py search "EntryStub" core/relinker/elfpatcher/src/macos/MacOsImage.cpp

Results

Check Result Note
Relinker build on macOS not run No build in this review
macos_sce_relro test not run Author reports 779 of 779 on an M1
Diff of the six changed files passed All hunks read; none excluded
Entry stub registers passed rdi, rdx, rcx are saved and restored
Stack alignment of new calls passed Four pushes and sub rsp, 8 keep 16-byte alignment
Test helper names passed 9 of 11 imports checked; PROVIDER and PT_LOAD not

Findings

Blocking

None.

Non-blocking

  1. core/relinker/CMakeLists.txt:1195: the 30 s CTest TIMEOUT applies to the whole test_macos_sce_relro.py run. That run makes 11 relinks, a module relink, 9 binary runs, an xcrun clang compile and two module runs. It passed on the author's M1, but a slower CI runner or Rosetta could exceed 30 s. A longer timeout for the native path would remove that risk.
  2. core/relinker/elfpatcher/src/macos/MacOsImage.cpp:544: a PT_SCE_RELRO page outside a writable Mach-O segment now fails the whole macOS relink. Before this change, such an input relinked without protection. The description says this is intended (fail closed), but no title was checked against it. The PR should say whether any shipping title reaches this path.

Not verified

  • The 779 of 779 result and the overlap check are the author's; I did not reproduce them.
  • macOS runtime behaviour (dyld fixup order, mprotect under Rosetta, Intel hardware) was not run. Real titles were not checked.
  • Files read: core/relinker/elfpatcher/src/macos/MacOsImage.cpp (1074 lines) was read through the diff and at the ranges listed above, not in full. core/relinker/elfpatcher/src/general/ProgramHeaderLayoutBuilder.cpp was read the same way. CMakeLists.txt, the header, docs/dev/debt/relinker.md and the new test were read through the diff; the new test is new, so its diff is its full text. Blocking judgements rest on the changed lines, which I read in full.
  • Helpers PROVIDER and PT_LOAD imported by the new test, and the internals of test_sce_relro.fixture, were not checked.
  • Interaction with --lazy-binding on macOS was not checked.

To get this to a good state

Nothing is required. The non-blocking points above are optional.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5876396314 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18373#pullrequestreview-5876396314). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-12T14:44:28Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this; the points below are optional. ## What I ran Head `2cbb4d05dc20e16f460d964d919dfddabbb7adab`, base `main`. Read-only review of the diff and of the repository at the head, through `repo_read.py`. No build, no test run, no write to the repository. <details> <summary>Commands</summary> ```text python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 1 12 python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 84 100 python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 140 156 python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 490 530 python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 540 625 python3 repo_read.py cat core/relinker/elfpatcher/src/macos/MacOsImage.cpp 690 765 python3 repo_read.py cat core/relinker/elfpatcher/src/general/ProgramHeaderLayoutBuilder.cpp 1 20 python3 repo_read.py search HasWritableLoadCoverage core/relinker python3 repo_read.py search "def guest_module" core/relinker/relinker/tests python3 repo_read.py search "def run_binary" core/relinker/relinker/tests python3 repo_read.py search "def library" core/relinker/relinker/tests python3 repo_read.py search "def executable" core/relinker/relinker/tests python3 repo_read.py search "def main_fixture" core/relinker/relinker/tests python3 repo_read.py search "class MachO" core/relinker/relinker/tests python3 repo_read.py search "PT_SCE_RELRO =" core/relinker/relinker/tests python3 repo_read.py search "def fixture" core/relinker/relinker/tests/test_sce_relro.py python3 repo_read.py search "HOOK =" core/relinker/relinker/tests/test_macos_trace_imports.py python3 repo_read.py search "dyld_info" core/relinker/relinker/tests/test_macos_output.py python3 repo_read.py search "EntryStub" core/relinker/elfpatcher/src/macos/MacOsImage.cpp ``` </details> ## Results | Check | Result | Note | |---|---|---| | Relinker build on macOS | not run | No build in this review | | `macos_sce_relro` test | not run | Author reports 779 of 779 on an M1 | | Diff of the six changed files | passed | All hunks read; none excluded | | Entry stub registers | passed | `rdi`, `rdx`, `rcx` are saved and restored | | Stack alignment of new calls | passed | Four pushes and `sub rsp, 8` keep 16-byte alignment | | Test helper names | passed | 9 of 11 imports checked; `PROVIDER` and `PT_LOAD` not | ## Findings ### Blocking None. ### Non-blocking 1. `core/relinker/CMakeLists.txt:1195`: the 30 s CTest `TIMEOUT` applies to the whole `test_macos_sce_relro.py` run. That run makes 11 relinks, a module relink, 9 binary runs, an `xcrun clang` compile and two module runs. It passed on the author's M1, but a slower CI runner or Rosetta could exceed 30 s. A longer timeout for the native path would remove that risk. 2. `core/relinker/elfpatcher/src/macos/MacOsImage.cpp:544`: a `PT_SCE_RELRO` page outside a writable Mach-O segment now fails the whole macOS relink. Before this change, such an input relinked without protection. The description says this is intended (fail closed), but no title was checked against it. The PR should say whether any shipping title reaches this path. ## Not verified - The 779 of 779 result and the overlap check are the author's; I did not reproduce them. - macOS runtime behaviour (dyld fixup order, `mprotect` under Rosetta, Intel hardware) was not run. Real titles were not checked. - Files read: `core/relinker/elfpatcher/src/macos/MacOsImage.cpp` (1074 lines) was read through the diff and at the ranges listed above, not in full. `core/relinker/elfpatcher/src/general/ProgramHeaderLayoutBuilder.cpp` was read the same way. `CMakeLists.txt`, the header, `docs/dev/debt/relinker.md` and the new test were read through the diff; the new test is new, so its diff is its full text. Blocking judgements rest on the changed lines, which I read in full. - Helpers `PROVIDER` and `PT_LOAD` imported by the new test, and the internals of `test_sce_relro.fixture`, were not checked. - Interaction with `--lazy-binding` on macOS was not checked. ## To get this to a good state Nothing is required. The non-blocking points above are optional.
MarcZX10 commented 2026-11-14 01:37:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T01:37:32Z.

Review: COMMENTED


Reviewed — no blocking findings

The inspected changes consistently protect eligible macOS RELRO ranges after fixups and import tracing, and no blocking defect was verified.

What I ran

Reviewed head bacf5493d9197747a42c8fe7d12e341880676e0d. I did not run commands or tests; this review session provided reader tools only. The author reports 779 of 779 tests passed on macOS 27 with Apple M1 and AppleClang; I did not verify that run.

Results

Check Result Note
Changed code review passed Reviewed all six changed files via the diff and relevant source ranges.
Test suite not run Author-reported results were not independently verified.
Runtime environments not run No local execution was available.

Findings

Blocking

None verified.

Non-blocking

None.

Not verified

The reported test run, macOS runtime behavior, and Linux and Windows host behavior were not independently verified. No files were excluded by the manifest. Reviewed files: core/relinker/CMakeLists.txt, core/relinker/elfpatcher/include/elfpatcher/general/ProgramHeaderLayoutBuilder.hpp, core/relinker/elfpatcher/src/general/ProgramHeaderLayoutBuilder.cpp, core/relinker/elfpatcher/src/macos/MacOsImage.cpp, core/relinker/relinker/tests/test_macos_sce_relro.py, and docs/dev/debt/relinker.md.

To get this to a good state

Nothing is required. The author-reported test results are optional context and were not independently checked.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5900497511 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18373#pullrequestreview-5900497511). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T01:37:32Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The inspected changes consistently protect eligible macOS RELRO ranges after fixups and import tracing, and no blocking defect was verified. ## What I ran Reviewed head `bacf5493d9197747a42c8fe7d12e341880676e0d`. I did not run commands or tests; this review session provided reader tools only. The author reports 779 of 779 tests passed on macOS 27 with Apple M1 and AppleClang; I did not verify that run. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Reviewed all six changed files via the diff and relevant source ranges. | | Test suite | not run | Author-reported results were not independently verified. | | Runtime environments | not run | No local execution was available. | ## Findings ### Blocking None verified. ### Non-blocking None. ## Not verified The reported test run, macOS runtime behavior, and Linux and Windows host behavior were not independently verified. No files were excluded by the manifest. Reviewed files: `core/relinker/CMakeLists.txt`, `core/relinker/elfpatcher/include/elfpatcher/general/ProgramHeaderLayoutBuilder.hpp`, `core/relinker/elfpatcher/src/general/ProgramHeaderLayoutBuilder.cpp`, `core/relinker/elfpatcher/src/macos/MacOsImage.cpp`, `core/relinker/relinker/tests/test_macos_sce_relro.py`, and `docs/dev/debt/relinker.md`. ## To get this to a good state Nothing is required. The author-reported test results are optional context and were not independently checked.
MarcZX10 commented 2026-11-14 08:50:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T08:50:29Z.

Review: APPROVED


Reviewed — looks good

The reviewed change at d4e92abe4f9ba3a941a218c263f28a0538fc9b2b adds macOS RELRO protection after fixups and import tracing; I found no verified blocking defect in the changed code.

What I ran

No build or tests were run. The author reports a macOS Release build and 779 passing tests; those results were not independently verified.

Results

Check Result Note
Changed code review passed All six changed files read
Build and tests not run Author-reported results only

Findings

Blocking

None.

Non-blocking

None.

Not verified

I did not run the build, tests, convention check, or overlap check. I did not verify behavior on macOS hardware, Windows or Linux hosts, or real titles. All six files listed as reviewed in the manifest were read: core/relinker/CMakeLists.txt, core/relinker/elfpatcher/include/elfpatcher/general/ProgramHeaderLayoutBuilder.hpp, core/relinker/elfpatcher/src/general/ProgramHeaderLayoutBuilder.cpp, core/relinker/elfpatcher/src/macos/MacOsImage.cpp, core/relinker/relinker/tests/test_macos_sce_relro.py, and docs/dev/debt/relinker.md. No changed files were excluded by the manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5903282049 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18373#pullrequestreview-5903282049). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T08:50:29Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed change at `d4e92abe4f9ba3a941a218c263f28a0538fc9b2b` adds macOS RELRO protection after fixups and import tracing; I found no verified blocking defect in the changed code. ## What I ran No build or tests were run. The author reports a macOS Release build and 779 passing tests; those results were not independently verified. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | All six changed files read | | Build and tests | not run | Author-reported results only | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified I did not run the build, tests, convention check, or overlap check. I did not verify behavior on macOS hardware, Windows or Linux hosts, or real titles. All six files listed as reviewed in the manifest were read: `core/relinker/CMakeLists.txt`, `core/relinker/elfpatcher/include/elfpatcher/general/ProgramHeaderLayoutBuilder.hpp`, `core/relinker/elfpatcher/src/general/ProgramHeaderLayoutBuilder.cpp`, `core/relinker/elfpatcher/src/macos/MacOsImage.cpp`, `core/relinker/relinker/tests/test_macos_sce_relro.py`, and `docs/dev/debt/relinker.md`. No changed files were excluded by the manifest. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-15 05:15:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-15T05:15:36Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

Reviewed head 16281ae57e7e7bb872b01bacc1cb004699c0d535. No shell commands or tests were run; the repository reader was used to inspect the prepared review materials and changed source files.

Results

Check Result Note
Change review passed Five changed files read
Tests not run Author reports macOS and CI runs
Reader-based source inspection passed Implementation and test harness inspected

Findings

Blocking

None.

Non-blocking

None.

Not verified

No changed file was excluded: all five files listed in review/manifest.json have full text in the prepared files and were read. Tests and behavior were not independently run; the macOS 27/Apple M1 test results in the PR description are author-reported. Intel Mac hardware, Linux and Windows hosts, and real titles were not tested per the description.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5909235557 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18373#pullrequestreview-5909235557). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-15T05:15:36Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this; the points below are optional. ## What I ran Reviewed head `16281ae57e7e7bb872b01bacc1cb004699c0d535`. No shell commands or tests were run; the repository reader was used to inspect the prepared review materials and changed source files. ## Results | Check | Result | Note | |---|---|---| | Change review | passed | Five changed files read | | Tests | not run | Author reports macOS and CI runs | | Reader-based source inspection | passed | Implementation and test harness inspected | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No changed file was excluded: all five files listed in `review/manifest.json` have full text in the prepared files and were read. Tests and behavior were not independently run; the macOS 27/Apple M1 test results in the PR description are author-reported. Intel Mac hardware, Linux and Windows hosts, and real titles were not tested per the description. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-21 04:41:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T04:41:13Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this change; the reviewed source and reported checks support merging.

What I ran

Reviewed head 79fa3163238bccd7d5ed7d600fff75584302a524 using the pinned repository reader. No build or test command was run in this session.

Results

Check Result Note
Changed source review passed All six changed files read
Build and tests not run Results in the description are author reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

I did not run the build or tests, and did not verify the author reported macOS execution. No changed files were excluded; files.json lists all six changed files as included, and all six were read. The review folder’s files.json itself was not available through the reader.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6002879971 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18373#pullrequestreview-6002879971). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T04:41:13Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this change; the reviewed source and reported checks support merging. ## What I ran Reviewed head `79fa3163238bccd7d5ed7d600fff75584302a524` using the pinned repository reader. No build or test command was run in this session. ## Results | Check | Result | Note | |---|---|---| | Changed source review | passed | All six changed files read | | Build and tests | not run | Results in the description are author reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified I did not run the build or tests, and did not verify the author reported macOS execution. No changed files were excluded; `files.json` lists all six changed files as included, and all six were read. The review folder’s `files.json` itself was not available through the reader. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 11:58:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T11:58:07Z.

Review: COMMENTED


Built this head with ANYPS5_RELINKER_ONLY=ON and ran macos_sce_relro on Linux. It passed its output checks for the read-only segment. Native macOS behavior remains outside this run.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6169303877 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18373#pullrequestreview-6169303877). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T11:58:07Z. **Review:** COMMENTED --- Built this head with `ANYPS5_RELINKER_ONLY=ON` and ran `macos_sce_relro` on Linux. It passed its output checks for the read-only segment. Native macOS behavior remains outside this run. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/18373:upstream-pr/18373'
git switch 'upstream-pr/18373'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/18373'
git switch 'upstream-pr/18373'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/18373'
git switch 'upstream-pr/18373'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/18373'
git switch 'main'
git merge --squash 'upstream-pr/18373'
git switch 'main'
git merge --ff-only 'upstream-pr/18373'
git switch 'main'
git merge 'upstream-pr/18373'
git push origin 'main'
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!18373
No description provided.