[PATCH v2] RISC-V: Add new relocation types for global array accesses with non-constant indices
Project / Subsystem
binutils / risc-v
Date
2026-07-20
Proposer
Liqin Weng <wengliqin@linux.spacemit.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Increased complexity in relocation handling.
All attributes
- project
- binutils
- subsystem
- risc-v
- patch_id
- —
- discussion_id
- 20260720090846.3650498-1-wengliqin@linux.spacemit.com
- source_type
- public_inbox
- title
- [PATCH v2] 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
- Adds new relocation types to RISC-V support for efficient global array access with non-constant subscripts.
- proposer
- Liqin Weng <wengliqin@linux.spacemit.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Increased complexity in relocation handling.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • risc-v
- • relocation
- • optimization
- • compiler
- bugzilla_url
- —
- date
- 2026-07-20T00:00:00.000Z
[PATCH v2] RISC-V: Add new relocation types for global array accesses with non-constant indices
This patch introduces new RISC-V relocation types (R_RISCV_BASE_IDX_*) to the binutils project. These relocations are designed to enable more efficient code generation for global array accesses where the array subscript is not a compile-time constant. The changes affect BFD, GAS, and header files, and include new test cases.