RISC-V BFD: corrects canonical extension order
Updates the canonical extension order for RISC-V to match the latest spec draft, changing V's position and removing N.
The RISC-V BFD library now reflects the latest extension ordering from the 20260818 draft specification. This change moves the ‘V’ extension before ‘P’ and removes the ‘N’ extension, ensuring compatibility with current RISC-V standards. The update corrects the internal representation of extension order in the assembler and linker.
In Details
This commit updates the riscv_ext_canonical_order string in elfxx-riscv.c to align with the 20260818 RISC-V specification draft. The canonical order is used by the assembler and linker to validate and process ISA extensions, particularly for the -march command-line option. The change prioritizes v over p and removes n, which is no longer a standard extension.
- RISC-V BFD
- The Binary File Descriptor (BFD) library as used for the RISC-V architecture. BFD provides a common interface for handling various object file formats, including ELF, and is a core component of GNU Binutils.
- Canonical extension order
- A standardized sequence for listing RISC-V processor extensions in toolchain arguments (like -march) and internal representations. This order ensures consistent interpretation of complex instruction set specifications.
- -march
- A compiler or assembler flag used to specify the target RISC-V architecture and its instruction set extensions. The assembler and linker use this information to generate correct machine code.
- ELF
- Executable and Linkable Format, a standard file format for object files, executables, and shared libraries on many Unix-like systems. BFD handles ELF files for RISC-V.