binutils Newspaper
OCTOBER 6, 2026
binutils — Needs Revision

Reverted patch to hide DT_INIT and DT_FINI functions

Patch to hide DT_INIT/DT_FINI functions in ELF reverted due to negative community feedback.

Alan Modra has reverted a patch that aimed to hide DT_INIT and DT_FINI functions in ELF objects. The decision was made because the majority opinion was that ld hiding these functions is surprising, they can be hidden at the source level, and the impact of them not being hidden is small. There might even be reasons to keep them exported. The patch also introduced regressions that required further fixes.

In the Thread 1 participant
  1. Alan Modra <amodra@gmail.com> maintainer

    Reverted a patch that hid DT_INIT and DT_FINI functions in ELF, citing community consensus and the availability of source-level hiding.

    “I have reverted the patch since majority opinion seems to be that ld hiding _init and _fini is surprising, it can be accomplished in source, and impact of non-hidden _init and _fini is small. There may even be reasons to export them. On top of that, the patch introduced regressions needing the following to fix.”

In Details

This discussion concerns a patch for the binutils ELF object file handler that proposed hiding the DT_INIT and DT_FINI symbols. These symbols typically point to functions executed during dynamic linking initialization and termination. The maintainer reverted the patch after receiving feedback that hiding them via the linker is unexpected and that source-level control is sufficient. The decision also acknowledges potential benefits of exporting these symbols and addresses regressions introduced by the patch.

For Context
DT_INIT
A dynamic section tag in an ELF file that indicates the address of the initialization function called when a shared library is loaded.
DT_FINI
A dynamic section tag in an ELF file that indicates the address of the termination function called when a shared library is unloaded.
ELF
Executable and Linkable Format, a standard file format for executables, object code, shared libraries, and core dumps on Unix-like systems.
ld
The GNU linker, part of the binutils package, responsible for combining object files and libraries into an executable or shared library.
dynamic linking
A process where an executable or library links against shared libraries at runtime, rather than having all code statically included at build time.
ABI
Application Binary Interface. Defines how compiled code interacts at the binary level, including function calling conventions, data type representation, and system call interfaces.
Filed Under: binutilselflinkerabireverted