[PATCH v5 2/4] RISC-V: Unify TLS handling in check_relocs.
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
- • Slight increase in indirection due to the new helper function, but overall simplification outweighs this.
- • Consolidates logic, potentially making future additions or modifications to TLS handling easier.
All attributes
- project
- binutils
- subsystem
- risc-v
- patch_id
- —
- discussion_id
- 20261005102157.2614702-3-kito.cheng@sifive.com
- source_type
- public_inbox
- title
- [PATCH v5 2/4] RISC-V: Unify TLS handling in check_relocs.
- headline
- RISC-V: Unify TLS handling in check_relocs.
- tldr
- Consolidate TLS relocation checks in RISC-V ELF object files.
- proposer
- Kito Cheng <kito.cheng@sifive.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Slight increase in indirection due to the new helper function, but overall simplification outweighs this.
- • Consolidates logic, potentially making future additions or modifications to TLS handling easier.
- series_id
- binutils:risc-v: unify tls handling in check_relocs
- series_role
- reply
- series_parts
- []
- tags
-
- • risc-v
- • tls
- • linker
- • relocation
- bugzilla_url
- —
- date
- 2026-10-05T00:00:00.000Z
[PATCH v5 2/4] RISC-V: Unify TLS handling in check_relocs.
This patch unifies the handling of various Thread-Local Storage (TLS) relocation types within the check_relocs function for RISC-V ELF files. By merging switch cases for different TLS relocations (GD, GOT, TLSDESC, TPREL), the code becomes more maintainable and reduces redundancy. This change simplifies the logic for validating TLS references and ensures consistent behavior across different TLS access models.