Relinker silently skips fSELF-wrapped bundled modules, so a title's own sce_module never gets converted #2599
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 StarMrGamer on 2026-10-10T08:17:02Z.
What
When a bundled module in
sce_module/is wrapped in fSELF (SELF container, magic54 14 f5 ee), the relinker silently ignores it: no error, no warning, noapp0/sce_moduleoutput. The module is simply not part of the runtime layout.This is inconsistent with the executable itself: an fSELF
eboot.binfails loudly withFAIL: The input is a SELF container, not an ELF. A module in the same wrapper is dropped without a word.Evidence
Catalog title PPSA17641 (ProsperoHomebrew 01.001.000-ish; record in https://github.com/blackbearreloaded/ps5-homebrew-catalog, artifact sha256-checked):
eboot.elfbesidesce_module/libc.prx, wherelibc.prxstarts with54 14 f5 ee 00 01 01 12.relinker eboot.elf out/app.elfprintssce_module/sce_modules/prx processing: enabled, completes with exit 0, and produces noapp0/sce_moduleat all. Nothing mentions the module.libc.prxfrom its fSELF wrapper (same container format as the eboot one: 32-byte header, entry table, ELF header block, scattered segments; the module variant only differs in magic). Re-run the same relink.app0/sce_module/libc.prx.guest.prxis produced.Where it happens:
GuestModuleBuilder::Build,core/relinker/relinker/src/guest/GuestModuleBuilder.cpparound line 84 — theisElffilter decides per file, and a non-ELF file is skipped rather than rejected.Why it matters
ps5-payload-dev SDK homebrew ships fSELF-wrapped modules in
sce_module/routinely (every catalog title I unwrapped had one, typically the SDKlibc.prx). For those titles the relinked executable runs without its own modules in the layout, and anything the module provides is missing at runtime. Per the project rules, unsupported inputs should fail clearly instead of being dropped.Possible directions
I have no preference; the current silence is the problem.
Tested
Linux, main
256b8ed4. Reproduced with PPSA17641 as above; the before/after behaviour differs only by the module's wrapper. Every catalog homebrewsce_moduleI checked is fSELF-wrapped.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by elsi06 on 2026-10-10T08:28:52Z.
Fix: commit
bc444a67on branchfix/relinker-self-guest-modulesof https://github.com/elsi06/AnyPS5, based onmainf6af6d11. The PR (#2605) was closed automatically by the intake rule.It takes the second direction from the issue: the guest module scan in
GuestModuleBuilder::BuildthrowsGuest module is a SELF container, not an ELF: <path>for a file starting with4f 15 3d 1dor54 14 f5 ee, asElfReaderalready does for a SELF executable (#184, #1317). This also applies in the recursive search for needed modules. Other non-ELF files are still skipped. No unwrapping, in line with #28 being closed.docs/user/USAGE.mdgets one sentence saying such a module is an error.Tested on macOS (Apple Silicon, AppleClang), relinker-only build:
guest_module_directoriesgets SELF cases for both magics, for Linux and Windows output: exit code 2, the module path in the message, no executable and noapp0/; with--exclude-sce-module libc.prxthe relink succeeds and converts only the other module.main'sGuestModuleBuilder.cppand pass with the change.tools/check_conventions.py --base origin/mainpass.Not tested with PPSA17641 or on Linux/Windows hosts.
Written with AI assistance.