fix(relinker): discover bundled modules in prx directories #602
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/602"
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 NumberGuan on 2026-10-05T02:23:57Z.
What
The relinker ignores bundled ELF modules in a sibling
prx/directory. Discover that directory alongside eithersce_module/orsce_modules/, preserve each module's folder underapp0/, and write Linux dependency paths relative to the importing module. The CLI layout and usage documentation reflect both folders.Refs #556. This addresses module discovery only. The duplicate-export rejection remains in place; the
rt7XQ7s-wQQcollision reported for DOOM + DOOM II still needs separate investigation. This PR does not claim that title now runs.Tested
Windows x64, supported WinLibs MinGW-w64 GCC 15.2.0 (
15.2.0posix-14.0.0-ucrt-r7), Python 3.12.core/relinker/CMakeLists.txtthrough an isolated CMake harness.ctest --output-on-failure --timeout 60 --parallel 2: 22/22 passed.GuestModuleBuilderbecause it rejects a loneprx/directory, and passes with this change.prx/, coexistence with either standard directory, dependencies between folders, preserved output paths and CLI layout, exclusion of matching filenames in both folders, invalid directories, singular/plural ambiguity, and retained duplicate-export rejection.DT_NEEDEDpaths were checked on Windows.No game or homebrew title was run. Native Linux execution, system-library builds, and the full-project test suite were not tested.
Checklist
main; no other open PR implements the same behavior.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-05T03:09:14Z.
Thanks, this looks right to me.
prx/is now read next to eithersce_module/orsce_modules/, exclusions apply to a file of that name in both folders, each converted module keeps its own folder underapp0/, and the LinuxDT_NEEDEDentries between modules are relative to the importing module (so$ORIGIN/x.guest.prxwithin one folder, as before, and$ORIGIN/../prx/...across folders). Two modules with the same file name in both folders still stop on "Conflicting guest output filename", which is a clear error.Since you couldn't run it on Linux, I did:
guest_module_directoriesand the updatedlinux_load_alignmentpass, both fail on main as expected, and the full ctest passes with this branch merged. It also merges cleanly with the other open PRs that touch the relinker.One thing for later, not for this PR: games usually load their
prx/modules themselves withsceKernelLoadStartModule("/app0/prx/..."). With this change those modules are already linked at startup, but that later call still goes todlopenon the original path rather than the converted.guest.prx, so it may need a small mapping once a game that does this gets further.CI hasn't run yet on this branch (first-time workflows need approval). Once it's green, it's ready to merge from my side.