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

Project / Subsystem

binutils / gas

Date

2026-05-16

Proposer

Fangrui Song <i@maskray.me>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Adding a new command-line option increases the complexity of the assembler.
  • Converting local symbols to section symbols reduces the size of the symbol table, but can make debugging more difficult.
  • Preserving local symbols can increase the size of the symbol table, but can improve the debugging experience.

All attributes

project
binutils
subsystem
gas
patch_id
discussion_id
CAN30aBE8hRqOUoo5zPNkcnSuPxy5Ox1yL5NN4CeOLiUu3vmMtA@mail.gmail.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
Introduces --reloc-section-sym option to control conversion of local symbols to section symbols in ELF relocations, aiding debugging and tooling.
proposer
Fangrui Song <i@maskray.me>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Adding a new command-line option increases the complexity of the assembler.
  • Converting local symbols to section symbols reduces the size of the symbol table, but can make debugging more difficult.
  • Preserving local symbols can increase the size of the symbol table, but can improve the debugging experience.
series_id
series_role
reply
series_parts
[]
tags
  • gas
  • assembler
  • ELF
  • relocation
  • symbol
bugzilla_url
date
2026-05-16T00:00:00.000Z

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

This patch introduces the --reloc-section-sym option to the GNU assembler (gas) for ELF files. This option controls how local symbols are converted to section symbols during relocation. The change intends to help with debugging and support tools that rely on preserved symbol names.