fix(relinker): name the SELF container and the bytes read when the input is not an ELF #184
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/184"
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 YossiYad on 2026-09-30T12:12:41Z.
What
ElfReader::ReadHeadertells the two kinds of wrong input apart instead of reporting "Invalid ELF magic number" for both:4f 15 3d 1dis a SELF container. The message says so and that the relinker takes the decrypted ELF, which is the case behind #173 (the reporter'seboot.binstarts with exactly those bytes).test_input_magic.pycovers the SELF magic, a\x7fCNTpackage header and a file shorter than the ELF header; it is registered next to the other Python relinker tests.Closes #173
Tested
Linux (Ubuntu 24.04 container, GCC 13, Ninja,
-DBUILD_TESTING=ON): fullctestpasses (65 tests including the new one). Ran the relinker by hand on a 4 KB file with the SELF magic and on one with the\x7fCNTmagic; both exit 2 with the new messages and no output file. Not tested on Windows.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository