You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(relinker): accept zero-sized data symbols at load boundaries - #4985
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 0x2400 and 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 - 1 calculation.
39 fixture conversions across Linux ELF, Windows PE and Mach-O verify numeric exports and local/RELATIVE pointer values, including page-aligned ends. Invalid functions, initializers, writes, gaps and nonempty ranges remain rejected.
Direct C++ checks preserve rejection of empty writable ranges and endpoint writes.
Conventions, test registration and whitespace checks pass.
Windows test: head c9a49a682 merged onto current main5d50886ee, 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/main passed for the combined tree. I did not run the new tests against main without the change.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fix