Landing: 90a7bfab3c33
Project / Subsystem
binutils / gas/loongarch
Date
2026-09-27
Author
liu zhensong <liuzhensong@sourceware.org>
Commit
90a7bfab3c335c208392dfee449cca48d25e0d50
Source
public_inbox
Perf win
Yes
Breaking
No
All attributes
- project
- binutils
- subsystem
- gas/loongarch
- patch_id
- —
- commit_hash
- 90a7bfab3c335c208392dfee449cca48d25e0d50
- source_type
- public_inbox
- headline
- LoongArch: Optimize alignment before linker-relaxable frags
- tldr
- LoongArch GAS optimizes alignment of early fragments to avoid R_LARCH_ALIGN relocations.
- author
- liu zhensong <liuzhensong@sourceware.org>
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • loongarch
- • optimization
- • gas
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-27T00:00:00.000Z
LoongArch GAS now converts initial alignment fragments into ordinary align-code fragments, allowing GAS to compute exact NOP padding. This avoids unnecessary R_LARCH_ALIGN relocations for these early alignments. The optimization is skipped if any .reloc *, R_LARCH_RELAX is present, as the exact linker-relaxable fragment cannot be determined prior to size_seg. The sec_flg1 flag is refreshed after this optimization.