Landing: 4fec67921a8c
Project / Subsystem
binutils / gas/loongarch
Date
2026-07-10
Author
liu zhensong <liuzhensong@sourceware.org>
Commit
4fec67921a8c11700dff6db1c8b6ad9255c59254
Source
public_inbox
Perf win
No
Breaking
No
All attributes
- project
- binutils
- subsystem
- gas/loongarch
- patch_id
- —
- commit_hash
- 4fec67921a8c11700dff6db1c8b6ad9255c59254
- source_type
- public_inbox
- headline
- LoongArch: Avoid relocation for addsy/subsy within the same fragment
- tldr
- Optimizes LoongArch assembler by skipping relocations when addsy and subsy fall within the same fragment, reducing object file size.
- author
- liu zhensong <liuzhensong@sourceware.org>
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • loongarch
- • gas
- • relocations
- • optimization
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-10T00:00:00.000Z
This commit enhances the LoongArch assembler’s efficiency by preventing unnecessary relocations when addsy and subsy directives appear within the same code fragment. It refines the handling of linker-relaxable instructions and alignment no-operation (nop) instructions, ensuring they coexist within a single fragment. By doing so, the assembler avoids generating a relocation when the operands for symbol arithmetic are contained entirely within one fragment, leading to cleaner object files.