[PATCH v3] RISC-V: Add new relocation types for global array accesses with non-constant indices
Project / Subsystem
binutils / risc-v
Date
2026-07-29
Proposer
Liqin Weng <wengliqin@linux.spacemit.com>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
All attributes
- project
- binutils
- subsystem
- risc-v
- patch_id
- —
- discussion_id
- 20260729075955.799091-1-wengliqin@linux.spacemit.com
- source_type
- public_inbox
- title
- [PATCH v3] 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 RISC-V relocation types R_RISCV_BASE_IDX_* for efficient non-constant global array access, includes relaxation for absolute int12, and renames internal ty…
- proposer
- Liqin Weng <wengliqin@linux.spacemit.com>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
- []
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • binutils
- • risc-v
- • relocation
- • compiler
- • optimization
- bugzilla_url
- —
- date
- 2026-07-29T00:00:00.000Z
[PATCH v3] RISC-V: Add new relocation types for global array accesses with non-constant indices
This third version of the patch introduces new RISC-V relocation types (R_RISCV_BASE_IDX_) to streamline global array accesses with dynamic indices. It clarifies that ‘absolute int12 relaxation’ is now supported for these types and renames internal relocation identifiers like INTERNAL_R_RISCV_BASE_IDX_ to R_RISCV_BASE_IDX_GPREL*. The changes span BFD and GAS, including new test cases.