Consolidate creation of stub bfd
Project / Subsystem
binutils / binutils
Date
2026-09-13
Proposer
Alan Modra <amodra@gmail.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Centralizing code reduces maintenance effort and potential for inconsistencies but requires careful handling of target-specific variations.
- • Early creation of stub BFDs resolves issues with section placement but might introduce a slight overhead if not all targets strictly require it.
- • Modifying linker behavior, even for internal structures, necessitates thorough testing to ensure compatibility across all supported targets and scenarios.
All attributes
- project
- binutils
- subsystem
- binutils
- patch_id
- —
- discussion_id
- aqZi6croPQWR5QZK@squeak.grove.modra.org
- source_type
- public_inbox
- title
- Consolidate creation of stub bfd
- headline
- Consolidate creation of stub bfd
- tldr
- Patch consolidates stub BFD creation logic into `ldelf.c`, simplifying code and fixing MIPS target orphan section placement.
- proposer
- Alan Modra <amodra@gmail.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Centralizing code reduces maintenance effort and potential for inconsistencies but requires careful handling of target-specific variations.
- • Early creation of stub BFDs resolves issues with section placement but might introduce a slight overhead if not all targets strictly require it.
- • Modifying linker behavior, even for internal structures, necessitates thorough testing to ensure compatibility across all supported targets and scenarios.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • binutils
- • linker
- • ELF
- • refactoring
- • patch
- bugzilla_url
- —
- date
- 2026-09-13T00:00:00.000Z
Consolidate creation of stub bfd
Alan Modra proposes a patch to refactor Binutils’ ELF handling by consolidating the creation of stub BFDs into a single location in ldelf.c. This change aims to reduce code duplication across various ELF targets. While intended to not alter target behavior, it fixes an issue on MIPS where the stub BFD was created later, affecting orphan section placement. The patch resolves this by ensuring earlier creation and adjusting test cases accordingly.