[PATCH 0/3] PE-COFF: Fix weak external symbol resolution bugs

Project / Subsystem

binutils / pe-coff

Date

2026-05-30

Proposer

Peter Damianov <peter0x44@disroot.org>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Increased code complexity in the linker vs. correct handling of weak externals.
  • Increased testsuite maintenance vs. improved confidence in linker correctness.

All attributes

project
binutils
subsystem
pe-coff
patch_id
discussion_id
20260530191522.57144-1-peter0x44@disroot.org
source_type
public_inbox
title
[PATCH 0/3] PE-COFF: Fix weak external symbol resolution bugs
headline
PE-COFF: Fix weak external symbol resolution bugs
tldr
This series fixes two bugs related to PE COFF weak external symbol resolution in the BFD linker and adds testsuite coverage.
proposer
Peter Damianov <peter0x44@disroot.org>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Increased code complexity in the linker vs. correct handling of weak externals.
  • Increased testsuite maintenance vs. improved confidence in linker correctness.
series_id
binutils:pe-coff: fix weak external symbol resolution bugs
series_role
cover
series_parts
[]
tags
  • PE-COFF
  • linker
  • weak symbols
  • symbol resolution
  • bfd
bugzilla_url
date
2026-05-30T00:00:00.000Z

[PATCH 0/3] PE-COFF: Fix weak external symbol resolution bugs

This patch series addresses two bugs in the BFD linker related to PE COFF weak external symbol resolution. The first patch fixes an issue where the linker loses the weak symbol’s aux record and fails to resolve the fallback alias when a strong undefined reference is seen first. The second patch corrects the handling of two weak externals for the same symbol, ensuring the linker prefers a real definition over NULL. The series also includes a new test suite covering a wide range of weak/strong symbol interactions.