RISC-V: Deprecate the privileged spec version selection
Deprecates RISC-V privileged spec version selection options and related code across binutils components.
This patch series aims to deprecate and eventually remove the mechanism for selecting RISC-V privileged spec versions within binutils. The changes include marking options like -mpriv-spec and --with-priv-spec as deprecated with a default to version 1.13, removing obsolete N extension CSRs, and cleaning up related code in gas, ld, and bfd. The primary motivation is that the RISC-V ISA spec has moved to using the Ss extension version, making the old privileged spec versioning less relevant.
- proposer
Proposes deprecating the RISC-V privileged spec version selection mechanism in binutils, citing its replacement by the Ss extension version and lack of modern relevance. The series plans to warn about deprecated options, remove unused CSRs, and clean up related code.
“In the ISA spec, the idea of the privileged spec version has been replaced by the version of the Ss extension. Also, the old compatibility logic is not very useful today. When I search the web for these options, I find almost nothing but the binutils documentation and its tests. On the RISC-V psABI side, we deprecated the related attributes a long time ago [1]. So I think it is time to leave…”
In Details
This patch series addresses the obsolescence of explicit RISC-V privileged specification version selection in binutils. The core idea is that the ISA spec has evolved, favoring the Ss extension version, rendering old mechanisms like -mpriv-spec and associated ELF attributes largely unused and complex. The series systematically deprecates these features, removes related code (like N extension CSRs), and updates documentation, simplifying the binutils codebase for RISC-V.
- RISC-V
- A modular and extensible open-standard instruction set architecture (ISA) based on Reduced Instruction Set Computer principles.
- privileged spec version
- A versioning scheme for the RISC-V privileged architecture specification, which defines system-level behavior and features. This mechanism is being superseded by newer approaches.
- Ss extension
- A specific extension in the RISC-V architecture that relates to system-level features and their versioning, replacing older methods of versioning the privileged specification.
- CSR
- Control and Status Register. Special registers in RISC-V used for system control and status information.
- gas
- The GNU Assembler, part of the GNU Binutils project, responsible for translating assembly language code into machine code.
- ld
- The GNU linker, also part of GNU Binutils, responsible for combining object files and libraries into an executable or library.
- bfd
- Binary File Descriptor library, part of GNU Binutils, which provides a common interface to various object file formats.