fix(relinker): match AppContent utility import to provider #13486

Closed
kyon-eth wants to merge 805 commits from upstream-pr/13486 into main
kyon-eth commented 2026-10-30 16:47:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kyon-eth on 2026-10-30T16:47:17Z.


What

Match imports qualified as libSceAppContentUtil to their declared libSceAppContent.prx dependency when an exact or normally normalized dependency is absent. This mapping is one-way; a physical-provider import is not redirected to the logical name, and ambiguous matches fail.

Both version-labelled inventories contain this pairing and their imported NIDs match the declared provider. These labels do not authenticate firmware provenance. No game unblock is claimed.

This branch builds on #13143, #13472, #13473, #13475, #13477 and #13482 and includes their commits. It must be rebased after those prerequisites land.

Tested

  • macOS x86-64: built and ran relinker-only import_module_tests, including the guest image reader, exact and normalized dependency precedence, reverse-direction rejection and ambiguity rejection.
  • A focused probe failed before the change and passed afterward. Conventions and diff whitespace checks pass.
  • The overlap checker reports the stated prerequisite PRs and cannot compare parent CMake changes against #5021, #7173, #7531, #9793, #10792, #10861, #11628, #11661, #11689 and #11698 because those branches conflict with main. Their CMake diffs do not reference the new test target. The overlap checklist remains unchecked pending complete comparison.
  • No Linux, Windows, console or title run; no full product build.

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: #13143, #13472, #13473, #13475, #13477, #13482
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5087883946 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13486). Originally posted by [kyon-eth](https://github.com/kyon-eth) on 2026-10-30T16:47:17Z. --- ### What Match imports qualified as `libSceAppContentUtil` to their declared `libSceAppContent.prx` dependency when an exact or normally normalized dependency is absent. This mapping is one-way; a physical-provider import is not redirected to the logical name, and ambiguous matches fail. Both version-labelled inventories contain this pairing and their imported NIDs match the declared provider. These labels do not authenticate firmware provenance. No game unblock is claimed. This branch builds on #13143, #13472, #13473, #13475, #13477 and #13482 and includes their commits. It must be rebased after those prerequisites land. ### Tested - macOS x86-64: built and ran relinker-only `import_module_tests`, including the guest image reader, exact and normalized dependency precedence, reverse-direction rejection and ambiguity rejection. - A focused probe failed before the change and passed afterward. Conventions and diff whitespace checks pass. - The overlap checker reports the stated prerequisite PRs and cannot compare parent CMake changes against #5021, #7173, #7531, #9793, #10792, #10861, #11628, #11661, #11689 and #11698 because those branches conflict with main. Their CMake diffs do not reference the new test target. The overlap checklist remains unchecked pending complete comparison. - No Linux, Windows, console or title run; no full product build. ### Checklist - [ ] 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: #13143, #13472, #13473, #13475, #13477, #13482 - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-11-19 13:45:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T13:45:33Z.

Review: COMMENTED


Reviewed — no blocking findings

The targeted AppContent dependency mapping looks consistent, but the pull request includes many additional changes that I did not review, so a formal approval is not justified.

What I ran

Reviewed head 0bde10d243b63a08556f9ceda6912cf5fef2b824. Read the prepared description, commits, manifest, and diff, plus the changed import mapping header, its guest image reader caller, and its tests through repo_read.py. No tests or builds were run.

Results

Check Result Note
Targeted import mapping review passed Direction and precedence covered
Test/build execution not run No commands executed
Full pull request review not run Many changed files not inspected

Findings

Blocking

None in the code inspected.

Non-blocking

None.

Sources

The reviewed implementation and tests are in core/relinker/domain/include/domain/ImportModule.hpp and core/relinker/relinker/tests/ImportModuleTests.cpp at the reviewed head.

Not verified

The manifest lists a very large set of changed files; this review read only core/relinker/domain/include/domain/ImportModule.hpp, core/relinker/relinker/src/guest/GuestImageReader.cpp, and core/relinker/relinker/tests/ImportModuleTests.cpp from the repository. Other changed files, including the workflow, build, library, shader, and tooling changes, were not inspected. No tests, builds, platform checks, or console behavior were verified.

To get this to a good state

Nothing is required for the targeted mapping. Review the remaining changed files before making a formal decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5976158888 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13486#pullrequestreview-5976158888). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T13:45:33Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The targeted AppContent dependency mapping looks consistent, but the pull request includes many additional changes that I did not review, so a formal approval is not justified. ## What I ran Reviewed head `0bde10d243b63a08556f9ceda6912cf5fef2b824`. Read the prepared description, commits, manifest, and diff, plus the changed import mapping header, its guest image reader caller, and its tests through `repo_read.py`. No tests or builds were run. ## Results | Check | Result | Note | |---|---|---| | Targeted import mapping review | passed | Direction and precedence covered | | Test/build execution | not run | No commands executed | | Full pull request review | not run | Many changed files not inspected | ## Findings ### Blocking None in the code inspected. ### Non-blocking None. ## Sources The reviewed implementation and tests are in `core/relinker/domain/include/domain/ImportModule.hpp` and `core/relinker/relinker/tests/ImportModuleTests.cpp` at the reviewed head. ## Not verified The manifest lists a very large set of changed files; this review read only `core/relinker/domain/include/domain/ImportModule.hpp`, `core/relinker/relinker/src/guest/GuestImageReader.cpp`, and `core/relinker/relinker/tests/ImportModuleTests.cpp` from the repository. Other changed files, including the workflow, build, library, shader, and tooling changes, were not inspected. No tests, builds, platform checks, or console behavior were verified. ## To get this to a good state Nothing is required for the targeted mapping. Review the remaining changed files before making a formal decision.
ligmaSec commented 2026-12-03 17:03:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T17:03:30Z.

Review: COMMENTED


The exact import_module CTest passed in a Linux relinker-only build. The AppContent cases check its utility import, provider ambiguity, and normalized dependency priority. This head conflicts with current main in ImportModule.hpp and ImportModuleTests.cpp. Preserve the existing GNM and SSL mappings and their regression cases when rebasing the stack.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6174528553 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13486#pullrequestreview-6174528553). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T17:03:30Z. **Review:** COMMENTED --- The exact `import_module` CTest passed in a Linux relinker-only build. The AppContent cases check its utility import, provider ambiguity, and normalized dependency priority. This head conflicts with current main in `ImportModule.hpp` and `ImportModuleTests.cpp`. Preserve the existing GNM and SSL mappings and their regression cases when rebasing the stack. AI-assisted: yes.

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!13486
No description provided.