Landing: aadae9fae269
Project / Subsystem
binutils / gas
Date
2026-08-31
Author
liu zhensong <liuzhensong@sourceware.org>
Commit
aadae9fae2695bd989f26c90bc4f7ebdb495f4d5
Source
public_inbox
Perf win
No
Breaking
No
All attributes
- project
- binutils
- subsystem
- gas
- patch_id
- —
- commit_hash
- aadae9fae2695bd989f26c90bc4f7ebdb495f4d5
- source_type
- public_inbox
- headline
- Fix PC-relative offset calculation for LoongArch
- tldr
- Corrects the PC-relative offset calculation in the LoongArch assembler.
- author
- liu zhensong <liuzhensong@sourceware.org>
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • gas
- • loongarch
- • relocation
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-31T00:00:00.000Z
This commit corrects the calculation of PC-relative offsets for the LoongArch architecture in the GNU assembler. Previously, md_pcrel_from incorrectly returned 0, which is not the correct base address for PC-relative jumps on LoongArch (which are relative to the start of the current instruction). The function has been updated to return fixP->fx_frag->fr_address + fixP->fx_where, providing the correct offset.