Re: [PATCH 2/3] gas/ELF: warn upon non-default visibility of local symbols

Project / Subsystem

binutils / gas/elf

Date

2026-05-08

Proposer

Jan Beulich <jbeulich@suse.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

/10

Technical tradeoffs

  • Warning on invalid symbol visibility may break existing builds.
  • Silently upgrading visibility to global may introduce unexpected symbol collisions.
  • Changing visibility semantics might affect linking behavior.

All attributes

project
binutils
subsystem
gas/elf
patch_id
discussion_id
b4ec2334-1821-4780-9876-f8a12d20dc4b@suse.com
source_type
public_inbox
title
Re: [PATCH 2/3] gas/ELF: warn upon non-default visibility of local symbols
headline
Gas/ELF: Warn Upon Non-Default Visibility of Local Symbols
tldr
The patch proposes a warning when local symbols have non-default visibility, which is against ELF spec. The author considers reverting to earlier behavior.
proposer
Jan Beulich <jbeulich@suse.com>
consensus
Proposed
outcome
proposed
sentiment_score
technical_tradeoffs
  • Warning on invalid symbol visibility may break existing builds.
  • Silently upgrading visibility to global may introduce unexpected symbol collisions.
  • Changing visibility semantics might affect linking behavior.
series_id
binutils:gas/elf: warn upon non-default visibility of local symbols
series_role
reply
series_parts
[]
tags
  • binutils
  • assembler
  • ELF
  • symbol visibility
  • gas
bugzilla_url
date
2026-05-08T00:00:00.000Z

Re: [PATCH 2/3] gas/ELF: warn upon non-default visibility of local symbols

This patch warns when local symbols are declared with non-default visibility (protected/hidden/internal), as the ELF spec forbids mixing STB_LOCAL with those STV_* attributes. The author is now reconsidering whether to instead treat symbols with non-default visibility as global, but hidden. The discussion weighs the risk of introducing unexpected globals against the benefit of adhering to the ELF specification.