Rename ldemul_create_output_section_statements

Project / Subsystem

binutils / binutils

Date

2026-09-13

Proposer

Alan Modra <amodra@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Renaming functions improves code readability and maintainability but requires updating all call sites and related documentation.
  • • Accurate function naming prevents misunderstandings about a function's purpose, potentially avoiding future bugs.
  • • The tradeoff is between the effort of renaming and the long-term benefit of clearer, more maintainable code.

All attributes

project
binutils
subsystem
binutils
patch_id
—
discussion_id
aqYvJRujIhQs78z0@squeak.grove.modra.org
source_type
public_inbox
title
Rename ldemul_create_output_section_statements
headline
Rename ldemul_create_output_section_statements
tldr
Renames `ldemul_create_output_section_statements` to `after_open_output` for clarity, as the function does not create sections.
proposer
Alan Modra <amodra@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Renaming functions improves code readability and maintainability but requires updating all call sites and related documentation.
  • • Accurate function naming prevents misunderstandings about a function's purpose, potentially avoiding future bugs.
  • • The tradeoff is between the effort of renaming and the long-term benefit of clearer, more maintainable code.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • binutils
  • • linker
  • • refactoring
  • • code clarity
  • • patch
bugzilla_url
—
date
2026-09-13T00:00:00.000Z

Rename ldemul_create_output_section_statements

Alan Modra proposes renaming the linker emulation function ldemul_create_output_section_statements to after_open_output. The change is motivated by the observation that this function’s actual purpose is not to create output sections, but rather to perform actions after the output file has been opened. This rename aims to improve code clarity and accuracy by better reflecting the function’s role in the linking process. The patch updates multiple emulation files and documentation.