[PATCH v2] elf: Hide _init/_fini and use function size from regular object

Project / Subsystem

binutils / elf

Date

2026-09-05

Proposer

"H.J. Lu" <hjl.tools@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Hiding linker-generated symbols vs. potential ambiguity.
  • • Using regular object sizes vs. dynamic object sizes for function size calculation.

All attributes

project
binutils
subsystem
elf
patch_id
—
discussion_id
CAMe9rOqvG-YGh_9vN0M5De+2gZJiuZPtsFZAN9Hv7GbqC43rOw@mail.gmail.com
source_type
public_inbox
title
[PATCH v2] elf: Hide _init/_fini and use function size from regular object
headline
elf: Hide _init/_fini and use function size from regular object
tldr
H.J. Lu proposes hiding _init/_fini symbols and using function sizes from regular objects to improve linker behavior with ELF objects.
proposer
"H.J. Lu" <hjl.tools@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Hiding linker-generated symbols vs. potential ambiguity.
  • • Using regular object sizes vs. dynamic object sizes for function size calculation.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • elf
  • • linker
  • • symbols
  • • initialization
bugzilla_url
—
date
2026-09-05T00:00:00.000Z

[PATCH v2] elf: Hide _init/_fini and use function size from regular object

H.J. Lu submits version 2 of a patch that aims to improve ELF object handling in the static linker. The changes involve hiding the _init and _fini symbols when they define DT_INIT and DT_FINI to prevent confusion, and using function sizes from regular objects instead of dynamic ones for better accuracy. Changes in v2 include replacing .nops with .space and adjusting testsuite configurations.