fix(tools): match guest module aliases in import audit #7179

Merged
MarcZX10 merged 1 commit from upstream-pr/7179 into main 2026-10-17 20:52:51 +00:00
MarcZX10 commented 2026-10-17 15:08:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T15:08:45Z.


What

Treat a converted *.guest.prx module as satisfying imports that name its original *.prx module. Apply the alias to module import classification and host dependency checks, and add a regression test for a guest module without ELF identity metadata.

Carries the ready patch offered in #7174. The original commit author, Leandro Soares, is preserved. This is complementary to #6171: the regression test fails on that branch because it has no identity metadata to map, while this change uses the converted filename alias. #6239 handles ordinary symbol names in registries; the overlap is limited to tools/import_audit.py and does not change module-name matching.

Tested

  • python3 tools/tests/test_import_audit.py: 98 passed, 1 skipped.
  • python3 tools/check_conventions.py --base upstream/main: passed locally.
  • git diff --check: passed.
  • tools/pr_overlap.py --branch codex/import-audit-guest-aliases-7174: no confirmed overlap; #6171 and #6239 required manual comparison due to branch conflicts.
  • Hosted relinker checks are running; no game/GPU testing applies.

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 or are listed in technical debt (n/a; no new unimplemented paths)
  • 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
  • Fixes: #7174
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (carried contributor-provided patch; original author preserved)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4901196821 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7179). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T15:08:45Z. --- ### What Treat a converted `*.guest.prx` module as satisfying imports that name its original `*.prx` module. Apply the alias to module import classification and host dependency checks, and add a regression test for a guest module without ELF identity metadata. Carries the ready patch offered in #7174. The original commit author, Leandro Soares, is preserved. This is complementary to #6171: the regression test fails on that branch because it has no identity metadata to map, while this change uses the converted filename alias. #6239 handles ordinary symbol names in registries; the overlap is limited to `tools/import_audit.py` and does not change module-name matching. ### Tested - `python3 tools/tests/test_import_audit.py`: 98 passed, 1 skipped. - `python3 tools/check_conventions.py --base upstream/main`: passed locally. - `git diff --check`: passed. - `tools/pr_overlap.py --branch codex/import-audit-guest-aliases-7174`: no confirmed overlap; #6171 and #6239 required manual comparison due to branch conflicts. - Hosted relinker checks are running; no game/GPU testing applies. ### 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 or are listed in technical debt (n/a; no new unimplemented paths) - [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] Fixes: #7174 - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes (carried contributor-provided patch; original author preserved)
github-actions[bot] commented 2026-10-17 15:30:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T15:30:31Z.


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 6171 tools/import_audit.py
tools/tests/test_import_audit.py
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235797841 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7179#issuecomment-6235797841). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T15:30:31Z. --- <!-- 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 6171](https://www.github.com/boykopovar/AnyPS5/pull/6171) | `tools/import_audit.py`<br>`tools/tests/test_import_audit.py` |
MarcZX10 commented 2026-10-17 16:02:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T16:02:02Z.


I manually reviewed the two overlap warnings. #6171 resolves ELF SONAME/SCE module identities and #6239 accepts ordinary ELF symbol names in registries. This PR handles converted PE filenames such as libX.prx.guest.prx by recording the base guest module name for import lookup; it does not change ELF metadata parsing or named-symbol/NID fallback. I found no duplicated behavior. The initial conventions failure was for the required PR template sections; the follow-up conventions run passed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6236264329 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7179#issuecomment-6236264329). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T16:02:02Z. --- I manually reviewed the two overlap warnings. #6171 resolves ELF SONAME/SCE module identities and #6239 accepts ordinary ELF symbol names in registries. This PR handles converted PE filenames such as `libX.prx.guest.prx` by recording the base guest module name for import lookup; it does not change ELF metadata parsing or named-symbol/NID fallback. I found no duplicated behavior. The initial conventions failure was for the required PR template sections; the follow-up conventions run passed.
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!7179
No description provided.