[PATCH v5 4/4] RISC-V: Introduce TLSDESC relaxation.

Project / Subsystem

binutils / risc-v

Date

2026-10-05

Proposer

Kito Cheng <kito.cheng@sifive.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Adds complexity to the relaxation pass to handle TLSDESC, potentially increasing compile/link times slightly.
  • • The in-place rewrite for non-relaxed sequences might introduce slightly larger code sizes than a fully relaxed sequence.

All attributes

project
binutils
subsystem
risc-v
patch_id
—
discussion_id
20261005102157.2614702-5-kito.cheng@sifive.com
source_type
public_inbox
title
[PATCH v5 4/4] RISC-V: Introduce TLSDESC relaxation.
headline
RISC-V: Introduce TLSDESC relaxation.
tldr
Enable TLSDESC for static executables by relaxing sequences or rewriting them in place.
proposer
Kito Cheng <kito.cheng@sifive.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Adds complexity to the relaxation pass to handle TLSDESC, potentially increasing compile/link times slightly.
  • • The in-place rewrite for non-relaxed sequences might introduce slightly larger code sizes than a fully relaxed sequence.
series_id
binutils:risc-v: introduce tlsdesc relaxation
series_role
reply
series_parts
[]
tags
  • • risc-v
  • • tls
  • • linker
  • • relaxation
bugzilla_url
—
date
2026-10-05T00:00:00.000Z

[PATCH v5 4/4] RISC-V: Introduce TLSDESC relaxation.

This patch introduces TLSDESC relaxation for RISC-V executables, allowing Thread-Local Storage (TLS) descriptors to function in static environments. It modifies the relax pass to either delete instructions in relaxed sequences or rewrite them in place for non-relaxed cases, ensuring TLSDESC works correctly in static executables where runtime resolution is not possible. This fixes a limitation in how TLSDESC was handled previously.