Re: [PATCH] ld: Don't ignore bfd_gc_sections failure
Project / Subsystem
binutils / ld
Date
2026-07-30
Proposer
"H.J. Lu" <hjl.tools@gmail.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
7/10
Technical tradeoffs
- • Ensures critical errors are not silently ignored.
- • Slightly increases verbosity if `bfd_gc_sections` fails, but improves robustness.
All attributes
- project
- binutils
- subsystem
- ld
- patch_id
- —
- discussion_id
- CAMe9rOqjBsX-4MkE0bonCMmj0Qyvxpd3cTZa9qq65vz7vtmsjw@mail.gmail.com
- source_type
- public_inbox
- title
- Re: [PATCH] ld: Don't ignore bfd_gc_sections failure
- headline
- ld: Don't ignore bfd_gc_sections failure
- tldr
- Report bfd_gc_sections failures as fatal errors instead of warnings to prevent potential issues in the linker.
- proposer
- "H.J. Lu" <hjl.tools@gmail.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- 7
- technical_tradeoffs
-
- • Ensures critical errors are not silently ignored.
- • Slightly increases verbosity if `bfd_gc_sections` fails, but improves robustness.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • linker
- • error handling
- • binutils
- bugzilla_url
- —
- date
- 2026-07-30T00:00:00.000Z
Re: [PATCH] ld: Don't ignore bfd_gc_sections failure
This patch modifies the linker (ld) to treat failures in bfd_gc_sections as fatal errors. Previously, these failures were sometimes treated as warnings. The change ensures that the fatal function is called with correct arguments to prevent the failure from being misinterpreted. This addresses an issue where linker warnings might mask critical errors, potentially leading to incorrect output.