[PATCH v3] LoongArch: fix .got.plt dislocation in static PDE
Project / Subsystem
binutils / loongarch
Date
2026-09-08
Proposer
Xi Ruoyao <xry111@aosc.io>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Unifying code paths for different relocation types to improve correctness and maintainability, potentially at the cost of slightly increased complexity in the shared subroutine.
All attributes
- project
- binutils
- subsystem
- loongarch
- patch_id
- —
- discussion_id
- 20260908101630.85575-1-xry111@aosc.io
- source_type
- public_inbox
- title
- [PATCH v3] LoongArch: fix .got.plt dislocation in static PDE
- headline
- LoongArch: Fix .got.plt dislocation in static PDE
- tldr
- Patch corrects .got.plt addressing in LoongArch static position-dependent executables.
- proposer
- Xi Ruoyao <xry111@aosc.io>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Unifying code paths for different relocation types to improve correctness and maintainability, potentially at the cost of slightly increased complexity in the shared subroutine.
- series_id
- —
- series_role
- cover
- series_parts
- []
- tags
-
- • LoongArch
- • linker
- • ELF
- bugzilla_url
- —
- date
- 2026-09-08T00:00:00.000Z
[PATCH v3] LoongArch: fix .got.plt dislocation in static PDE
Xi Ruoyao proposes a patch to fix incorrect addressing of .got.plt entries in LoongArch static Position-Dependent Executables (PDEs). The previous implementation miscalculated the .got.plt entry address by always accounting for two reserved entries for ld.so, which do not exist in static PDEs. This resulted in a two-slot dislocation for all .got.plt entries. The patch unifies code paths for several relocation types to call a corrected subroutine that properly references .igot.plt for static builds.