Re: [RFC PATCH] LoongArch: Use local anchors for relocatable section symbols

Project / Subsystem

binutils / loongarch

Date

2026-09-20

Proposer

Alan Modra <amodra@gmail.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Working around linker limitations with local anchors might be simpler but could obscure the root cause and potentially limit future optimizations.
  • • Fixing the core relaxation mechanism is more complex but leads to a cleaner and more robust solution.

All attributes

project
binutils
subsystem
loongarch
patch_id
—
discussion_id
arBsgyYMkLUw4ReL@squeak.grove.modra.org
source_type
public_inbox
title
Re: [RFC PATCH] LoongArch: Use local anchors for relocatable section symbols
headline
LoongArch: Use local anchors for relocatable section symbols
tldr
Alan Modra questions the necessity of using local anchors for relocatable section symbols in LoongArch, suggesting the relaxation code should be fixed instead.
proposer
Alan Modra <amodra@gmail.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Working around linker limitations with local anchors might be simpler but could obscure the root cause and potentially limit future optimizations.
  • • Fixing the core relaxation mechanism is more complex but leads to a cleaner and more robust solution.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • LoongArch
  • • linker
  • • relocation
  • • relaxation
  • • RFC
bugzilla_url
—
date
2026-09-20T00:00:00.000Z

Re: [RFC PATCH] LoongArch: Use local anchors for relocatable section symbols

Alan Modra responds to an RFC patch for LoongArch concerning relocatable section symbols. He questions the approach of using local anchors, suggesting that the underlying issue might be within the LoongArch relaxation code itself, which apparently does not permit symbols to be optimized into a section symbol plus offset form. Modra implies that fixing the relaxation code would be a more appropriate solution unless it can be convincingly demonstrated that this is not possible.