[PATCH 2/3] LoongArch: Optimize TC_FORCE_RELOCATION_SUB_LOCAL

Project / Subsystem

binutils / loongarch

Date

2026-08-13

Proposer

mengqinggang <mengqinggang@loongson.cn>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Reduces ADD/SUB relocations at the potential cost of slightly more complex relocation handling logic.
  • • Improves code generation efficiency by using PC-relative fixups where applicable.

All attributes

project
binutils
subsystem
loongarch
patch_id
—
discussion_id
20260813170736.1880481-3-mengqinggang@loongson.cn
source_type
public_inbox
title
[PATCH 2/3] LoongArch: Optimize TC_FORCE_RELOCATION_SUB_LOCAL
headline
LoongArch: Optimize TC_FORCE_RELOCATION_SUB_LOCAL
tldr
Avoid ADD/SUB relocations by using PC-relative fixups when possible.
proposer
mengqinggang <mengqinggang@loongson.cn>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Reduces ADD/SUB relocations at the potential cost of slightly more complex relocation handling logic.
  • • Improves code generation efficiency by using PC-relative fixups where applicable.
series_id
binutils:loongarch: optimize tc_force_relocation_sub_local
series_role
reply
series_parts
[]
tags
  • • loongarch
  • • assembler
  • • relocations
  • • optimization
bugzilla_url
—
date
2026-08-13T00:00:00.000Z

[PATCH 2/3] LoongArch: Optimize TC_FORCE_RELOCATION_SUB_LOCAL

This patch optimizes relocation handling for LoongArch by changing fixups to be PC-relative when no linker-relaxable instructions are present between a subtraction symbol and the program counter. This aims to reduce the emission of ADD/SUB relocations, improving code generation efficiency.