fix(relinker): resolve Windows guest filename casing #1101
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1101"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by eliasbruno124-dev on 2026-10-07T11:16:19Z.
What
DOOM + DOOM II (PPSA21444, 03.000.000) ships
prx/party.prxbut requestsParty.prx. On Windows the relinker converts the supplied module, then incorrectly requests a separatelibs/Party.prxand exits with0xc0000135.Resolve a Windows guest dependency by exact filename/SONAME first, then by ASCII-insensitive filename. Carry the resolved spelling into the generated loader's provider aliases. The title-supplied module remains the provider. SONAME-only aliases, symbol identities and Linux filename matching remain case-sensitive; genuinely missing imports still fail. No Sysmodule or host library behavior changes.
Rebased onto main
f71bf7fd403ba955de26219b3f2cd8aad6510a64. Final commit:ba3e75a1001e6a5cec385e208330fdac973db462. The production patch is unchanged from the previously reviewedfcd5b3df. The wrong-case SONAME regression now sits beside the filename cases, leaving the existing missing-dependency block unchanged. This removes the textual test conflict with #1153 without incorporating its implementation or dropping either regression.Tested
Windows 11, WinLibs MinGW-w64 GCC 15.2.0, Release/Ninja, Python 3.12:
guest_needed_modulesgroup; no skips. The current conventions check passes.f71bf7fdwith the expected missingParty.prxfailure (0xc0000135). For this negative comparison, the sole changed production translation unit was compiled from exact main and relinked with the other unchanged production objects from the clean candidate build. The original candidate objects and executable were preserved.2236238f9b9769cf4559aee351819ffaafb250df. The updated head merges cleanly. A separate fresh build of that combination passes all 30 registered relinker groups, including both filename/SONAME and GUI failure-status cases. That integration is local only; this PR does not contain the foreign production change.Party.prxdependency and stops atFAIL: unresolved ELF import 1OLgvahaSco from libSceNpWebApi2.prx(0xc0000139). Retained input hashes and the host library hashes are unchanged.The original-title bootstrap uses the same source-built host libraries from
9a1c12f3d9e6c1e213a1adbe4901fd969a51b4beas the earlier comparison, reached through an absolute custom--rpath. Those libraries are not claimed to be current main. Historical preparation normalized SELF metadata and flattened represented module directories; the original loaded payloads and filenames are retained. Large assets were not recopied for this bootstrap retest. No menu, gameplay or frame-rate result is claimed.This validation covers the relinker component, not a full-project build. Native Linux was not rerun for this update. The earlier independent Windows/Linux report applies to the previous
fcd5b3dfcommit and remains historical evidence.Reproduction:
Overlap: #716 is now part of the base. #1153 changes diagnostic failure handling; it is tested separately as described above and is not a dependency. The filename correction retains the existing runtime-name initialization used by the deferred-loading work in #846. No duplicate system-library implementation is added. This follows the ownership requirements discussed in #676 and the review of #1061.
Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by ctz23 on 2026-10-07T13:38:07Z.
Independent validation of
fcd5b3dff24c3547de6b16192a573eaeee4e57e0against its parent0d3c1eec8950e64cd9492d6c054cc620cc5d3b38:test_windows_import_modules.pyagainst the parent binary reproduces0xc0000135, trying to load the absentlibs/Party.prx. The same fixture passes against the candidate binary. Its native Windows checks cover mixed-case filenames in executable and guest imports, exact SONAME precedence, wrong-provider/missing-symbol failures, and rejection of incorrectly cased SONAME-only aliases.Party.prxwhen the file isparty.prx, andALIAS.prxwhen the SONAME isalias.prx, retain those unresolvedDT_NEEDEDentries and fail at runtime with the expected missing-library diagnostics. Synthetic ELF input segments were aligned for the native Linux loader before conversion; generated outputs were not edited.Scope: the relinker component and synthetic integration fixtures. The external CMake wrapper uses the unchanged project
core/relinker/CMakeLists.txtand reproduces the root C++20, static-link and MinGW test-runtime settings. No full-project build, system libraries, real title/homebrew run, or GitHub Actions result is claimed. Linux cannot execute the PE fixtures; their runtime checks were performed on Windows. The candidate fixture also passes against the parent binary on Linux, so that converter-only result does not detect the original Windows runtime bug.All four CTest suites contain the complete registered set: 348 successful executions, including 174 on the candidate. SHA256 verification matched all 49 archived Windows evidence files; both source checkouts remain clean. At inspection, current main
e79c971f99acd6987b1d6545e9ba57c00b11fe04has the samecore/relinkertree as the parent above.Validation scripts and this report were prepared with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T06:43:32Z.
Checked the build and full ctest on Linux merged onto current main (419/419). The Windows job runs
windows_import_modulesand passes, which is where the0xc0000135regression is exercised. Linux filename matching and wrong-case SONAMEs still behave as before (covered by the new cases). Merging.