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

  • Smaller `.symtab` size vs. preserving symbol names for debugging.
  • Increased complexity in the assembler.

All attributes

project
binutils
subsystem
gas
patch_id
discussion_id
20260228061955.23818-1-i@maskray.me
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
GAS gets a new option to control conversion of local symbols to section symbols in relocations, aiding debugging and symbol preservation.
proposer
Jan Beulich <jbeulich@suse.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Smaller `.symtab` size vs. preserving symbol names for debugging.
  • Increased complexity in the assembler.
series_id
series_role
standalone
series_parts
[]
tags
  • assembler
  • gas
  • relocation
  • elf
  • symbols
bugzilla_url
date
2026-05-15T00:00:00.000Z

Re: [PATCH v3] gas: add --reloc-section-sym={all, internal, none} option for ELF

A new assembler option, --reloc-section-sym, controls the conversion of local symbols to section symbols (STT_SECTION) in ELF relocations. This conversion, which minimizes .symtab size, can now be disabled or limited to compiler-generated symbols. The option helps with debugging and supports tools that rely on preserved symbol names.