fix(relinker): rebase guest runpaths from their output directories #1822
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1822"
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-08T20:33:25Z.
What
Linux guest modules always received a run path rebased by two parent directories. That works for
app0/sce_module, but a required module emitted underapp0/Media/Modulessearchesapp0/libsinstead of the executable'slibsdirectory. A module from the game root overshoots in the other direction.Rebase
$ORIGINpaths from each emitted module's actual directory to the executable directory. Preserve the configured suffix and leave absolute paths unchanged. Discovery, original game files and Windows import resolution are unchanged.The regression converts fixtures with providers at the input root, in
sce_module, and at two deeper nonstandard paths. Each conversion also includes a standard-directory module, so modules at different depths must resolve the same configured host-library directory. It checks default, bare$ORIGIN, custom paths containing a space, and absolute paths, with separate input and output directories.Tested
Windows 11, MinGW-w64 GCC 15.2.0, Release,
ANYPS5_RELINKER_ONLY=ON, based directly on main4b6ab6bb7371869f85837ff824f409b49f1e8081:git diff --checkpass. All 36 groups other thantls_function_coveragepass within 30 seconds, including the newguest_runpathgroup.Upstream CI at this exact head passes the Linux and Windows full builds/tests and the relinker jobs on Linux, Windows and macOS. This supplements the local Windows checks above; it is not a title-playability result.
Reviewed related #732, #1165/#1232, #716 and the open discovery changes; none implements this path-depth correction. Trial merges against the inspected heads of #846, #1462, #1503, #1506, #1529, #1597, #1617, #1782 and #1815 are clean. None is included or required.
Overlap rechecked on October 9 against main
f1451396: this branch merges cleanly with main. #2001 removes relinker test registrations and changes guest output-directory construction, causing conflicts in the CMake registration and module builder. It does not implement this per-module runpath rebasing and is not included or required. Whichever branch lands later needs conflict resolution.Checklist
main; no other inspected open PR implements this correctionImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T04:18:31Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/relinker/relinker/tests/test_guest_runpath.py