Repository navigation
fix(relinker): accept relocations against symbol index 0 for Windows and macOS - #7902
Merged
oneandonlydean merged 1 commit intoOct 19, 2026
Merged
Conversation
…and macOS Code analysis rejected R_X86_64_64, GLOB_DAT and JUMP_SLOT relocations whose symbol index is 0 (STN_UNDEF) with 'invalid relocation symbol', so the Windows and macOS conversions failed while Linux converted the same input. The pipeline already resolves such relocations to 0 plus the addend, as the gABI defines and as the relinker technical debt entry records for null symbol entries; only an all-zero entry at a nonzero index was accepted. Index 0 is now treated as an import slot like that entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
12 tasks done
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Code analysis rejected
R_X86_64_64,GLOB_DATandJUMP_SLOTrelocations whose symbol index is 0 (STN_UNDEF) withCode analysis: invalid relocation symbol, so--windowsand--macosfailed on an input that the Linux conversion accepts. The pipeline already resolves such relocations to 0 plus the addend, as the gABI defines and as the relinker technical debt entry records for null symbol entries; only an all-zero entry at a nonzero index was accepted. Index 0 is now treated as an import slot like that entry.Tested
Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), relinker-only build of this branch on current
main:test_null_symbol_relocations.pynow also runs both relocations against symbol index 0. Onmainit fails withCode analysis: invalid relocation symbol (offset 0x308)for Windows; with the fix the Windows executable exits 42 (slot 0x308 holds 0, slot 0x310 holds the addend), macOS converts, and the Linux imports match the index 1 case.ctest: 210/210 passed.python3 tools/check_conventions.py --base origin/mainpasses.Open PRs #6586, #6607, #6618, #6684, #6974, #6977 and #7037 change other parts of
CodeInstructionCollector.cpp; none changes this check. The PR overlap check could not compare #6618 and #6977, which conflict withmain. Checked by hand: both already conflict withmainin this file without this change (#6977 carries theR_X86_64_RELATIVEchange merged as #6357), and neither changes the line this PR changes.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code