Repository navigation
fix(relinker): resolve all-zero dynamic symbols to null on Windows - #4602
Closed
pushkarreddyy wants to merge 1 commit into
Closed
pushkarreddyy wants to merge 1 commit into
pushkarreddyy wants to merge 1 commit into
Conversation
pushkarreddyy
force-pushed
the
fix/relinker-empty-import-symbol
branch
from
October 12, 2026 16:50
c9929cc to
b317379
Compare
This was referenced Oct 12, 2026
pushkarreddyy
force-pushed
the
fix/relinker-empty-import-symbol
branch
2 times, most recently
from
October 12, 2026 18:20
8d6096c to
352e9d4
Compare
pushkarreddyy
force-pushed
the
fix/relinker-empty-import-symbol
branch
from
October 12, 2026 18:26
352e9d4 to
603fba8
Compare
10 tasks done
Contributor
Author
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
Fixes #4437. Unblocks OliSe Player (
PPSA01153).In OliSe Player (
PPSA01153), the executable contains seven weak references pointing at dynamic symbol entries whose 24 bytes are all zero (no name, local, undefined, value 0). On Windows,WindowsRelocationBuilder::ApplythrewFAIL: Empty import symbol name (offset 0x18c5bb8).WindowsRelocationBuilder::Apply: when an import symbol name is empty, inspects the 24-byte symbol entry indynamicSection.DynSymData. If the entire 24-byte entry is zero (unreferenced / weak null symbol), verifies addend (type != 1 && addend != 0throwsGLOB_DAT/JUMP_SLOT relocation has a nonzero addend), writes the null/addend pointer directly to the target location (image.RequireWritable(target, 8); image.WritePointer(target, addend);), and skips adding a PE import entry. Dynamic symbols with an empty name that have non-zero attributes still throwEmpty import symbol name.TechnicalDebt.md.Tested
core/relinker/relinker/tests/test_windows_import_modules.pyverifying both that an executable with an all-zero dynamic symbol entry resolves cleanly to null on Windows, and that a non-zero symbol with an empty name is rejected withEmpty import symbol name.python tools/check_conventions.py --base origin/mainpassed cleanly with 0 errors.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)