Landing: 2e2848327d8f
Project / Subsystem
binutils / pe-coff
Date
2026-06-30
Author
Alan Modra <amodra@sourceware.org>
Commit
2e2848327d8f8490f77af1a8aebf8aa3a2de588c
Source
public_inbox
Perf win
No
Breaking
No
All attributes
- project
- binutils
- subsystem
- pe-coff
- patch_id
- —
- commit_hash
- 2e2848327d8f8490f77af1a8aebf8aa3a2de588c
- source_type
- public_inbox
- headline
- PE-COFF linker handles weak externals when strong undefined symbols appear first
- tldr
- Fixes PE-COFF object linking to correctly resolve weak external symbols, even when a strong undefined symbol is seen first.
- 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
This commit corrects how the PE-COFF linker resolves weak external symbols by ensuring proper handling when a strong undefined symbol for the same name is encountered earlier in the linking process. Previously, this scenario could lead to “undefined reference” errors for symbols like GCC-emitted personality routines that use weak externals with fallbacks. The fix ensures that symbol class and auxiliary records are stored correctly, and the weak alias fallback mechanism is activated even for initially strong undefined symbols that later take on weak external characteristics.