Landing: afec39e439ea
Project / Subsystem
binutils / pe-coff
Date
2026-06-30
Author
Alan Modra <amodra@sourceware.org>
Commit
afec39e439eaeb643057e3baf26088fec727348f
Source
public_inbox
Perf win
No
Breaking
No
All attributes
- project
- binutils
- subsystem
- pe-coff
- patch_id
- —
- commit_hash
- afec39e439eaeb643057e3baf26088fec727348f
- source_type
- public_inbox
- headline
- PE-COFF linker prefers defined weak external over null fallback
- tldr
- Fixes PE-COFF weak external symbol resolution to prefer defined fallback aliases, preventing runtime crashes.
- author
- Alan Modra <amodra@sourceware.org>
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • pe-coff
- • linker
- • weak symbols
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-30T00:00:00.000Z
The PE-COFF linker now correctly prefers weak external symbols with defined fallback aliases over those with null fallbacks. Previously, if a weak declaration with a null fallback was linked before a weak definition with a valid fallback, the symbol would incorrectly resolve to address 0, leading to crashes. This change aligns binutils behavior with lld and ensures more robust symbol resolution for weak externals.