[PATCH] elf: Hide DT_INIT and DT_FINI functions

Project / Subsystem

binutils / elf

Date

2026-09-10

Proposer

H.J. Lu

Source type

public_inbox

Consensus

Under Review

Sentiment

5/10

Technical tradeoffs

  • • Hides symbols that might otherwise be useful for introspection or debugging, but are not intended for external dynamic linking.
  • • Addresses a potential for symbol conflicts or misinterpretation by ensuring only necessary symbols are exported.

All attributes

project
binutils
subsystem
elf
patch_id
—
discussion_id
CAMe9rOqYe=QBuWsWaNESBTn3EN4_p1EvpObHQN2XL57GGQCgyA@mail.gmail.com
source_type
public_inbox
title
[PATCH] elf: Hide DT_INIT and DT_FINI functions
headline
elf: Hide DT_INIT and DT_FINI functions
tldr
Hides DT_INIT and DT_FINI functions from the dynamic symbol table to resolve linker issues.
proposer
H.J. Lu
consensus
Under Review
outcome
under_review
sentiment_score
5
technical_tradeoffs
  • • Hides symbols that might otherwise be useful for introspection or debugging, but are not intended for external dynamic linking.
  • • Addresses a potential for symbol conflicts or misinterpretation by ensuring only necessary symbols are exported.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • ELF
  • • linker
  • • symbols
  • • dynamic linking
bugzilla_url
—
date
2026-09-10T00:00:00.000Z

[PATCH] elf: Hide DT_INIT and DT_FINI functions

This patch proposes to hide the special functions used by the linker to define DT_INIT and DT_FINI in executables and shared libraries. The goal is to prevent these functions from appearing in the dynamic symbol table, addressing issues related to their handling. The patch includes modifications to bfd/elflink.c and adds new test cases in ld/testsuite/ld-elf.