Re: [PATCH v3] gas: add --reloc-section-sym={all, internal, none} option for ELF
Project / Subsystem
binutils / gas
Date
2026-05-15
Proposer
Jan Beulich <jbeulich@suse.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Reduced symbol table size when converting local symbols to section symbols.
- • Potential loss of information about individual local symbols in the symbol table, which may complicate debugging.
- • Increased complexity in the assembler code to support the new option.
All attributes
- project
- binutils
- subsystem
- gas
- patch_id
- —
- discussion_id
- 88097170-c97c-4388-81bc-a2b5e53a89ef@suse.com
- source_type
- public_inbox
- title
- Re: [PATCH v3] gas: add --reloc-section-sym={all, internal, none} option for ELF
- headline
- gas: add --reloc-section-sym={all, internal, none} option for ELF
- tldr
- Adds a new assembler option to control the conversion of local symbols to section symbols in relocation entries.
- proposer
- Jan Beulich <jbeulich@suse.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Reduced symbol table size when converting local symbols to section symbols.
- • Potential loss of information about individual local symbols in the symbol table, which may complicate debugging.
- • Increased complexity in the assembler code to support the new option.
- series_id
- —
- series_role
- reply
- series_parts
- []
- tags
-
- • gas
- • assembler
- • ELF
- • relocation
- • symbol table
- bugzilla_url
- —
- date
- 2026-05-15T00:00:00.000Z
Re: [PATCH v3] gas: add --reloc-section-sym={all, internal, none} option for ELF
This patch (in reply to the original proposal) introduces the --reloc-section-sym option to the GNU assembler for ELF targets. This option controls how the assembler handles local symbols in relocations, allowing users to convert all eligible local symbols to section symbols (all), only compiler-generated locals (internal), or keep all symbols as is (none). The change can be useful for debugging and tools relying on preserved symbol names. A maintainer has requested confirmation that the new tests pass for a wide range of targets.