fix(relinker): allow Windows export aliases when probing backup copies #7418

Merged
tkcm01 merged 1 commit from upstream-pr/7418 into main 2026-10-19 19:51:59 +00:00
tkcm01 commented 2026-10-18 05:24:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by tkcm01 on 2026-10-18T05:24:25Z.


What

Pass windows = true when Cli::ReadModules probes guest module SONAMEs for backup copy detection (GuestImageReader().Read(..., true).Soname), so guest modules containing identical ordinary function export aliases (supported on Windows since 5ea9ce2e4) are not prematurely rejected before GuestModuleBuilder::Build validates them with the target platform's windows flag.

Tested

  • Built relinker on macOS (-DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON) and ran ctest --test-dir build-relinker --output-on-failure (185/185 tests passed, including the new backup-alias case in guest_module_directories).

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4906633893 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7418). Originally posted by [tkcm01](https://github.com/tkcm01) on 2026-10-18T05:24:25Z. --- ### What Pass `windows = true` when `Cli::ReadModules` probes guest module SONAMEs for backup copy detection (`GuestImageReader().Read(..., true).Soname`), so guest modules containing identical ordinary function export aliases (supported on Windows since `5ea9ce2e4`) are not prematurely rejected before `GuestModuleBuilder::Build` validates them with the target platform's `windows` flag. ### Tested - Built `relinker` on macOS (`-DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON`) and ran `ctest --test-dir build-relinker --output-on-failure` (185/185 tests passed, including the new `backup-alias` case in `guest_module_directories`). ### 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](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: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
DProkos commented 2026-10-18 19:21:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DProkos on 2026-10-18T19:21:14Z.


Windows check of 8bcf040ab merged onto current main (c4c2b3aa7, clean merge).

Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release, ANYPS5_RELINKER_ONLY=ON, BUILD_TESTING=ON, Python 3.11.0.

  • guest_module_directories: passed, including the new backup-alias case for both the Linux and the Windows output.
  • Full relinker suite: 196/196 passed.

Negative control: with NativeModules.cpp restored to main and the new test kept, guest_module_directories fails at the backup-alias assertion (test_guest_module_directories.py:180, the backup copy is not reported as skipped). With the PR's line back it passes again.

Not run: titles or homebrew.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6254088168 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7418#issuecomment-6254088168). Originally posted by [DProkos](https://github.com/DProkos) on 2026-10-18T19:21:14Z. --- Windows check of 8bcf040ab merged onto current `main` (`c4c2b3aa7`, clean merge). Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release, `ANYPS5_RELINKER_ONLY=ON`, `BUILD_TESTING=ON`, Python 3.11.0. - `guest_module_directories`: passed, including the new `backup-alias` case for both the Linux and the Windows output. - Full relinker suite: 196/196 passed. **Negative control:** with `NativeModules.cpp` restored to `main` and the new test kept, `guest_module_directories` fails at the `backup-alias` assertion (`test_guest_module_directories.py:180`, the backup copy is not reported as skipped). With the PR's line back it passes again. Not run: titles or homebrew. AI-assisted: yes
adriadam10 commented 2026-10-19 19:53:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T19:53:13Z.


Checked: the SONAME probe now reads with windows = true, only for the backup-copy detection; GuestModuleBuilder::Build still validates exports with the target's flag, and the new test covers both targets (Linux still rejects the duplicate alias). Windows run and negative control by @DProkos confirm it. Merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6275950513 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7418#issuecomment-6275950513). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T19:53:13Z. --- Checked: the SONAME probe now reads with `windows = true`, only for the backup-copy detection; `GuestModuleBuilder::Build` still validates exports with the target's flag, and the new test covers both targets (Linux still rejects the duplicate alias). Windows run and negative control by @DProkos confirm it. Merged.
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!7418
No description provided.