fix(relinker): accept zero-sized data symbols at load boundaries #4985
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4985"
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 Ondra97 on 2026-10-13T07:18:31Z.
What
Bundled modules with zero-sized defined data or NOTYPE symbols at a load boundary were rejected because the reader and native export writers required one byte. A fixture whose writable load ends at
0x2400and whose data symbol denotes that address failed before producing output.Accept these symbols as validated address points, including the load endpoint. Function symbols still require executable bytes, nonempty ranges must remain contained, and writable ranges still reject size zero before the
size - 1calculation.The ELF symbol specification allows zero to mean no or unknown size. GNU ld's documented boundary labels assign a symbol to the end of an output section.
Tested
Windows 11 x64, WinLibs MinGW-w64 GCC 15.2.0, Python 3.14; final base
mainc2565f014:Linux/Mac output was inspected on Windows; no Linux or macOS execution, full runtime build or commercial title run.
Checklist
main; no other open PR implements the same fixImported from boykopovar/AnyPS5. Originally posted by coltken95 on 2026-10-13T11:10:48Z.
Linux validation (Ubuntu 24.04, GCC 13.3, Release), this PR's commit on
mainat77b9f7270:guest_zero_sized_symbols,guest_module_identityandguest_export_lookuppass, so the relinked Linux output is executed here, not only inspected.main's relinker sources and this PR's tests,guest_zero_sized_symbolsfails and the other two pass, so the new test catches the rejection.AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-13T11:51:42Z.
Windows test: head
c9a49a682merged onto currentmain5d50886ee, together with 9 other open pull requests in one build (the merges were conflict-free); a failure would have been bisected per PR. Windows 10, MinGW GCC (WinLibs), Ninja Release,-j2: full build 0 errors; ctest for the tests this change adds or touches: guest_zero_sized_symbols passed, windows_guest_export_aliases passed;python tools/check_conventions.py --base upstream/mainpassed for the combined tree. I did not run the new tests againstmainwithout the change.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:33:23Z.
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.
Pull request closed