fix(relinker): skip backup copies of guest modules in the online converter too #10997
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10997"
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 SandstromPL on 2026-10-25T13:20:07Z.
What
#7380 made the command-line relinker skip a dumper's backup copy of a module. That is an ELF module whose file name extends another module's in the same directory, with the same SONAME, such as
libX.prx.esbakorlibX.prxbaknext tolibX.prx. #7418 then allowed Windows export aliases while probing.The check lives in the CLI's
ReadModules. The online converter doesn't useReadModules:demo/web/archive.mjshands every ELF insce_module/toBindings.cpp, and from there toConversion. So the online converter still stops on these layouts withAmbiguous guest dependency name: libX.prx. #7380 left that as a follow-up under "Not covered". Its examples are Furi (#7020), with.prx,.prx.esbakand.prxbakcopies of each module, and Dreaming Sarah (#3018), withlibc.prx.esbak.The check moves into the relinker core as
RemoveBackupCopies:Conversion::Convertruns it before patching or converting modules. It reports each skipped copy through the progress messages, so the online converter shows the sameSkipping backup copy: …line the command line prints.ReadModulescalls the same function, so the command line and--verify-patchesbehave as before. A module list thatReadModuleshas already filtered passes throughConvertunchanged.docs/user/USAGE.mdnow says both the command line and the online converter skip backup copies.The online converter's packager copies the untouched backup files into the output app, as the command line leaves them on disk.
Tested
Linux (Ubuntu 24.04, GCC 13.3), relinker-only build (
-DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON) onmain4017310678:relinker_conversionhas a new case, run for both the Linux and Windows targets.libSceFace.prx,libSceFace.prx.esbakandlibSceFace.prxbak, all with the SONAMElibSceFace.prx, throughConversionas the online converter does. It requires one converted module and bothSkipping backup copymessages..esbakwith a different SONAME is still converted.DT_SONAME.Conversion::Convert, the case fails withAmbiguous guest dependency name: libSceFace.prx.guest_module_directoriespasses unchanged. It holds #7380's and #7418's command-line backup-copy cases, which now go through the shared function.Bindings.cppis unchanged and passes its modules to the sameConversion::Convert.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T13:31:01Z.
Review: APPROVED
Reviewed exact head
479fcec4ee05d861e13051216992a056ed43e945.RemoveBackupCopiescentralizes the existing same-directory filename-prefix plus matching-nonempty-SONAME rule, mutates the module list once, and reports skipped paths through the converter progress interface. Both CLI loading and core conversion call it, so online conversion now follows the same rule and prefiltered CLI input remains unchanged. The newConversion::Convertregression covers.esbakand.prxbakcopies for Linux/Windows targets, requires progress messages, and confirms a similarly named module with a different SONAME is retained.I ran
python3 tools/check_conventions.py --base upstream/main --head HEADandgit diff --check upstream/main...HEAD; both pass. The author reports the full 296-test relinker suite passing. Hosted Ubuntu, Windows, macOS ARM, and ASan checks pass; macOS x86_64 is still in progress. The WebAssembly module was not built locally because Emscripten is unavailable; its unchanged binding routes modules through the testedConversion::Convertentry point.