RISC-V: Ignore the deprecated privileged spec attributes
Removes assembler emission and linker processing of deprecated RISC-V privileged spec ELF attributes.
This patch modifies the RISC-V assembler and linker to ignore deprecated privileged spec ELF attributes (Tag_RISCV_priv_spec, Tag_RISCV_priv_spec_minor, Tag_RISCV_priv_spec_revision). The assembler will no longer emit these attributes, and the linker will not process them, thus removing the associated conflict warnings and simplifying tests. This change aligns with the RISC-V psABI’s deprecation of these attributes.
- proposer
Removes the emission of deprecated RISC-V privileged spec ELF attributes by the assembler and stops the linker from processing them, simplifying code and tests.
“The assembler no longer emits them when CSR or privileged instructions are used, so riscv_is_priv_insn and explicit_priv_attr are removed. The linker ignores them in the input and does not output them, so the 1.9.1 conflict warning is gone too. The attr-merge-priv-spec tests are reduced to one test that checks the attributes are dropped, and the gas tests that checked the emitted attributes are…”
In Details
This patch removes the code that emits and processes RISC-V specific ELF tags related to privileged specification versions (Tag_RISCV_priv_spec, etc.). The RISC-V psABI has deprecated these, and this change stops gas from emitting them and ld from interpreting them. Test cases are adjusted to reflect this removal, ensuring no regressions while cleaning up obsolete functionality.
- RISC-V psABI
- The Application Binary Interface for the RISC-V architecture, defining conventions for how software components interact at the binary level, including object file formats and system calls.
- ELF
- Executable and Linkable Format, a common standard file format for executables, object code, shared libraries, and core dumps, used by many Unix-like systems.
- Tag_RISCV_priv_spec
- An ELF tag specifically for RISC-V that denotes the privileged specification version used by the code.
- 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.