fix(relinker): name the second SELF container magic as a SELF input #1317
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1317"
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 Dextroid17 on 2026-10-07T23:28:19Z.
What
ElfReader::ReadHeadernames0x1D3D154Fas a SELF container. Retail dumps also carry a second container magic,0xEEF51454(54 14 f5 ee), and that one fell through to the generic branch:The message reads as a corrupt input rather than an encrypted one, so the user cannot tell that decryption is the missing step — which is what issues #1033 and #1305 ran into.
Both magics now throw the SELF message.
Measured against two retail dumps:
eboot.binandlibcohtml.Prospero.prxstart with54 14 f5 ee, so today it reports "Invalid ELF magic number".eboot.binandsce_module/libSceNpCppWebApi.prxstart with4f 15 3d 1d, already named.Two lines, one new test case, no behaviour change for inputs that are not SELF.
Tested
Linux (CachyOS, GCC, Release,
BUILD_TESTING=ON),relinkertarget rebuilt (3 s).ElfReader.cpp(git stash push -- core/relinker/relinker/src/parsing/ElfReader.cpp), rebuilt, andinput_magicfails on the new case with exactlyFAIL: Invalid ELF magic number: 54 14 f5 ee. Restored, it passes.ctest -R "input_magic|elf_header|elf_offsets|dynamic_segment|string_table_bounds|guest_needed_modules|guest_module_directories|linux_load_alignment"— 8/8 pass.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)Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-08T03:10:38Z.
@oneandonlydean ready for eyes — names the second SELF container magic so the relinker reports a SELF rather than Invalid ELF magic number; the test flips when the reader is reverted. Four checks green.