[PATCH] gas/doc: clarify internal symbol vs local symbol terminology

Fangrui Song i@maskray.me
Sun Mar 1 20:23:34 GMT 2026


On Sat, Feb 21, 2026 at 6:49 PM Fangrui Song <i@maskray.me> wrote:
>
> From: Fangrui Song <maskray@sourceware.org>
>
> In ELF, "local symbols" refer to symbols of STB_LOCAL binding. The
> doc is inconsistent: while it uses "local symbol" in places like .local,
> "local symbols" are also used for .L-prefixed symbols (as determined by
> bfd_is_local_label).
>
> Rename "Local Symbol Names" to "Internal Symbol Names" for .L-prefixed
> symbols, and rename "Local Labels" to "Numeric Local Labels" for
> N:/Nb/Nf numeric labels.  This avoids confusion with ELF STB_LOCAL
> "local symbols".
>
> The term "internal symbol" is chosen over alternatives like "temporary
> symbol" because it describes the purpose of these symbols: they are for
> internal use by compilers and assemblers, not meant to be visible
> externally.  While ELF defines STV_INTERNAL as a symbol visibility, it
> is rarely used in practice and unlikely to cause confusion (only used by
> SGI for their link-time interprocedural optimization; useless on other
> OSes).
> ---

Hi Alan and Nick,

What do you think of the clarification? This "internal symbol" name is
suggested by Jan at
https://sourceware.org/pipermail/binutils/2026-February/148178.html


More information about the Binutils mailing list