[PATCH] LoongArch: Emit relocations even after .option norelax
Project / Subsystem
binutils / loongarch
Date
2026-09-30
Proposer
mengqinggang <mengqinggang@loongson.cn>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Shifting the relocation emission logic from a global `norelax` check to a per-fragment check increases complexity but ensures correctness in edge cases.
All attributes
- project
- binutils
- subsystem
- loongarch
- patch_id
- —
- discussion_id
- 20260930071709.1426943-1-mengqinggang@loongson.cn
- source_type
- public_inbox
- title
- [PATCH] LoongArch: Emit relocations even after .option norelax
- headline
- LoongArch: Emit relocations even after .option norelax
- tldr
- Ensures LoongArch relocations are emitted even when relaxation is disabled.
- proposer
- mengqinggang <mengqinggang@loongson.cn>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Shifting the relocation emission logic from a global `norelax` check to a per-fragment check increases complexity but ensures correctness in edge cases.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • loongarch
- • gas
- • relocations
- • assembler
- bugzilla_url
- —
- date
- 2026-09-30T00:00:00.000Z
[PATCH] LoongArch: Emit relocations even after .option norelax
This patch corrects an issue in the LoongArch assembler (gas) where relocations spanning a relax fragment were not emitted when .option norelax was active. The fix removes a global check for relaxation status in _loongarch_force_relocation_sub_same, instead relying on the relocation’s coverage of a relax fragment to determine if it should be emitted.