Re: [PATCH] elf: Hide DT_INIT and DT_FINI functions
Project / Subsystem
binutils / elf
Date
2026-09-12
Proposer
Alan Modra <amodra@gmail.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Automatically hiding `_init` and `_fini` from .dynsym simplifies symbol tables but deviates slightly from a strict interpretation of user-supplied symbols.
- • This change aligns with common practice and improves the clarity of dynamic linking information.
All attributes
- project
- binutils
- subsystem
- elf
- patch_id
- —
- discussion_id
- aqSgvUFtjNhIpqC-@squeak.grove.modra.org
- source_type
- public_inbox
- title
- Re: [PATCH] elf: Hide DT_INIT and DT_FINI functions
- headline
- elf: Hide DT_INIT and DT_FINI functions
- tldr
- Reviewer OK'd patch to hide DT_INIT/DT_FINI functions, agreeing they are special and should be hidden by GNU ld.
- proposer
- Alan Modra <amodra@gmail.com>
- consensus
- Proposed
- outcome
- ready
- sentiment_score
- —
- technical_tradeoffs
-
- • Automatically hiding `_init` and `_fini` from .dynsym simplifies symbol tables but deviates slightly from a strict interpretation of user-supplied symbols.
- • This change aligns with common practice and improves the clarity of dynamic linking information.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • elf
- • linker
- • symbol
- bugzilla_url
- —
- date
- 2026-09-12T00:00:00.000Z
Re: [PATCH] elf: Hide DT_INIT and DT_FINI functions
This discussion concerns a patch to hide _init and _fini functions by default in GNU ld, which are associated with DT_INIT and DT_FINI dynamic section entries. While the ELF specification is silent on this exact behavior, the reviewer agrees that these functions are special and that GNU ld correctly handles them by hiding them from the dynamic symbol table (.dynsym).