Re: [PATCH v3] LoongArch: fix .got.plt dislocation in static PDE

Project / Subsystem

binutils / loongarch

Date

2026-09-10

Proposer

mengqinggang <mengqinggang@loongson.cn>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Simplifies and unifies relocation handling code.
  • • Corrects a latent bug that became apparent after changes in a previous release.

All attributes

project
binutils
subsystem
loongarch
patch_id
—
discussion_id
69f1006e-9a25-40dc-9569-02790c975056@loongson.cn
source_type
public_inbox
title
Re: [PATCH v3] LoongArch: fix .got.plt dislocation in static PDE
headline
LoongArch: Fix .got.plt dislocation in static PDE
tldr
Corrected .got.plt addressing for static executables on LoongArch.
proposer
mengqinggang <mengqinggang@loongson.cn>
consensus
Proposed
outcome
committed
sentiment_score
—
technical_tradeoffs
  • • Simplifies and unifies relocation handling code.
  • • Corrects a latent bug that became apparent after changes in a previous release.
series_id
—
series_role
reply
series_parts
[]
tags
  • • LoongArch
  • • linker
  • • relocation
  • • static linking
  • • GOT
bugzilla_url
—
date
2026-09-10T00:00:00.000Z

Re: [PATCH v3] LoongArch: fix .got.plt dislocation in static PDE

This patch addresses an issue on LoongArch where the .got.plt entry addresses were miscalculated for static Position-Dependent Executables (PDE). The miscalculation stemmed from always accounting for .got.plt entries reserved for ld.so, which are absent in static PDE. This resulted in a two-slot dislocation for all .got.plt entries. The fix unifies code paths to use a correct subroutine, addressing latent issues in ifunc handling as well.