Landing: 8ec22f3191b1
Project / Subsystem
binutils / binutils/loongarch
Date
2026-09-10
Author
liu zhensong <liuzhensong@sourceware.org>
Commit
8ec22f3191b1917a06dcbe84f6bbef042462bf5b
Source
public_inbox
Perf win
No
Breaking
No
All attributes
- project
- binutils
- subsystem
- binutils/loongarch
- patch_id
- —
- commit_hash
- 8ec22f3191b1917a06dcbe84f6bbef042462bf5b
- source_type
- public_inbox
- headline
- LoongArch static executables: fix .got.plt dislocation
- tldr
- Correctly calculates .got.plt entry addresses for static LoongArch executables, fixing a latent bug exposed in version 2.47.
- author
- liu zhensong <liuzhensong@sourceware.org>
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • loongarch
- • linker
- • relocation
- • static-linking
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-10T00:00:00.000Z
This commit addresses an issue in LoongArch ELF object file generation where the address calculation for .got.plt entries in static Position-Dependent Executables (PDEs) was incorrect. The code mistakenly always accounted for two .got.plt entries reserved for ld.so, which are absent in static PDEs. This resulted in a dislocation of all .got.plt entries by two slots. The fix unifies code paths for related relocations to use a correct subroutine, resolving latent issues in ifunc handling and ensuring correct .got.plt addressing for static builds.