loongarch: Use linksr stubs bfd rather than linker aligns bfd

Project / Subsystem

binutils / loongarch

Date

2026-09-15

Proposer

Alan Modra <amodra@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Standardizes Loongarch's relocation handling with common linker stub code.
  • • Enables stub BFDs for dynamic sections.
  • • Requires a testsuite fix due to changes in orphan placement behavior.

All attributes

project
binutils
subsystem
loongarch
patch_id
—
discussion_id
aqj83nau3ueksQGq@squeak.grove.modra.org
source_type
public_inbox
title
loongarch: Use linksr stubs bfd rather than linker aligns bfd
headline
loongarch: Use linksr stubs bfd rather than linker aligns bfd
tldr
Loongarch adopts common linker stub code, renaming 'linker aligns' to 'linker stubs'.
proposer
Alan Modra <amodra@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Standardizes Loongarch's relocation handling with common linker stub code.
  • • Enables stub BFDs for dynamic sections.
  • • Requires a testsuite fix due to changes in orphan placement behavior.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • binutils
  • • loongarch
  • • linker
  • • code-refactoring
  • • relocation
bugzilla_url
—
date
2026-09-15T00:00:00.000Z

loongarch: Use linksr stubs bfd rather than linker aligns bfd

This patch refactors the Loongarch target in binutils to use the common code for creating linker stub BFDs, renaming the existing ‘linker aligns’ to ‘linker stubs’. This change allows the stub BFD to be created in all linker modes, not just relocatable linking, making it available for dynamic sections as well. A fix to the testsuite is included to accommodate the change in orphan placement.