fix(relinker): name the bundled module dropped for being a SELF container #4623
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4623"
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-12T16:59:13Z.
What
Fixes #4488.
Since the module scan stopped throwing on a SELF candidate (#3397), a bundled module in a SELF container
is silently left out of the conversion.
GuestModuleBuilder::Buildcomputes aselfflag for everycandidate and then discards it:
isElfreturnsfalsefor a SELF container exactly as it does for anyother non-ELF file, and the caller only pushes the ones that pass. A user whose module is skipped gets no
line naming the file, and
docs/user/USAGE.mdstill documents the previous behaviour ("A bundled modulein a SELF container is an error, as the executable is").
Wire the flag that is already there into the
elseof the ELF test, so the drop reports itself:One call site, no new members, and no change to which files are converted — a skip that already happened
now names itself. The second file corrects the USAGE.md sentence the code now contradicts: "A bundled
module in a SELF container is skipped, and named in the output; the input executable must still be a clean
ELF."
If skipping SELF modules was not the intent and the throw should return, the diagnostic is still the
right first step — it makes the drop visible either way — but that USAGE.md line should then be restored
instead of rewritten. I read #3397 as deliberate and wrote the doc to match.
Tested
CachyOS Linux, GCC 16.2.1, Release, on upstream
main2a5eca11c(this PR's parent commit):relinkertarget builds clean, andtools/check_conventions.py --base upstream/mainpasses;test_guest_module_directories.pypasses, including the-self-*cases #3397 changed to expect theskip, so the skip itself is unchanged and only the reporting is new;
sit between the header and the message are elided):
where before there was no line naming the file at all.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt — no unimplemented path here; this removes a silent drop.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T14:46:08Z.
Closing as a duplicate: main already has this change. #4501 added the same
else if (self)branch inNativeModules.cpp(it printsSkipping SELF container: <path> (unwrap it before relinking)) and rewrote the matching sentence indocs/user/USAGE.md. #4488 is closed. This PR now conflicts with main and would only change the wording of the message.Feel free to reopen if something is still missing on top of main (for example a different message format, with a test pinning it).
Pull request closed