fix(relinker): reject guest modules in SELF containers #2605
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2605"
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 elsi06 on 2026-10-10T08:23:32Z.
What
Fixes #2599.
A bundled module in
sce_module/,sce_modules/orprx/whose file starts with a SELF container magic (4f 15 3d 1dor54 14 f5 ee) was filtered out like any other non-ELF file. The relink succeeded without it, and the module was missing at run time without any message.GuestModuleBuildernow throwsGuest module is a SELF container, not an ELF: <path>for such a file, the same wayElfReaderalready rejects a SELF executable (#184, #1317). The check also covers the recursive search for needed modules, where a file is only read when its name matches a missingDT_NEEDEDentry. Other non-ELF files in the module directories are still skipped as before.The relinker is not changed to unwrap SELF containers; it keeps taking decrypted ELF input only (see the closed #28).
--exclude-sce-modulestill drops such a module, but the message does not suggest it because the flag is deprecated.docs/user/USAGE.mdstates that a bundled module in a SELF container is an error.Tested
macOS (Apple Silicon, AppleClang), relinker-only build (
-DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON) onmainf6af6d11:guest_module_directoriesgets SELF cases for both magics and for Linux and Windows output: the relink fails with exit code 2, names the module, and writes neither the executable norapp0/; with--exclude-sce-module libc.prxit succeeds and converts only the remaining module.main'sGuestModuleBuilder.cppand pass with this change.tools/check_conventions.py --base origin/mainpasses.Not tested with a real title; PPSA17641 from the issue was not available. Windows and Linux hosts were not run.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T08:23:42Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T08:52:49Z.
Checked the build and
guest_module_directorieson Linux (relinker scope); the new cases fail without the change and pass with it. Both SELF magics are rejected with the module path,--exclude-sce-modulestill works, and other non-ELF files are still skipped. Merging once CI is green.