Re: [PATCH v5] RISC-V: Add new relocation types for global array accesses with non-constant indices
Project / Subsystem
binutils / risc-v
Date
2026-08-05
Proposer
Jiawei <jiawei@iscas.ac.cn>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Enables more efficient code generation for a specific access pattern at the cost of introducing new relocation types and complexity in the toolchain.
- • Requires careful management of internal vs. emitted relocation types and adherence to ABI specifications.
All attributes
- project
- binutils
- subsystem
- risc-v
- patch_id
- —
- discussion_id
- e202ce18-cb7c-48f8-98ff-33946506e754@iscas.ac.cn
- source_type
- public_inbox
- title
- Re: [PATCH v5] RISC-V: Add new relocation types for global array accesses with non-constant indices
- headline
- RISC-V: Add new relocation types for global array accesses with non-constant indices
- tldr
- A patch adds new RISC-V relocation types to support efficient global array access with non-constant indices.
- proposer
- Jiawei <jiawei@iscas.ac.cn>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Enables more efficient code generation for a specific access pattern at the cost of introducing new relocation types and complexity in the toolchain.
- • Requires careful management of internal vs. emitted relocation types and adherence to ABI specifications.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • binutils
- • risc-v
- • relocations
- • compiler
- bugzilla_url
- —
- date
- 2026-08-05T00:00:00.000Z
Re: [PATCH v5] RISC-V: Add new relocation types for global array accesses with non-constant indices
Liqin Weng’s patch introduces new RISC-V relocation types (R_RISCV_BASE_IDX_*) to facilitate more efficient code generation for global array accesses where the array subscript is not a constant. The changes span BFD, gas, and ld, including new relocation definitions and support for internal relaxed relocation types. Jiawei reviewed the patch, approving it with minor requests for header declarations, TODO removal, and GNU comment formatting.