Landing: acbf21547ecc
Project / Subsystem
binutils / gas/loongarch
Date
2026-08-31
Author
liu zhensong <liuzhensong@sourceware.org>
Commit
acbf21547ecc21e2cab7e9fc56633deefb207fe4
Source
public_inbox
Perf win
Yes
Breaking
No
All attributes
- project
- binutils
- subsystem
- gas/loongarch
- patch_id
- —
- commit_hash
- acbf21547ecc21e2cab7e9fc56633deefb207fe4
- source_type
- public_inbox
- headline
- LoongArch: Optimize TC_FORCE_RELOCATION_SUB_LOCAL
- tldr
- LoongArch assembler optimizes relocation generation to avoid ADD/SUB relocations when possible.
- author
- liu zhensong <liuzhensong@sourceware.org>
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • loongarch
- • optimization
- • assembler
- • relocations
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-31T00:00:00.000Z
The LoongArch assembler now optimizes relocation generation for subtraction symbols relative to the PC. If no linker-relaxable instructions exist between the subtraction symbol and the PC, it changes the fixup to be PC-relative. This change avoids emitting ADD/SUB relocations, leading to more efficient code generation.