RISC-V: Add -z zicfilp=, -z zicfiss= and the CFI report options
Kito Cheng adds linker options for RISC-V CFI properties (-z zicfilp=, -z zicfiss=) and reporting, following RISC-V toolchain conventions.
Kito Cheng has submitted a patch to binutils that introduces new linker options for RISC-V Control Flow Integrity (CFI) properties. These options, -z zicfilp= and -z zicfiss=, along with corresponding reporting flags, are defined by the RISC-V toolchain conventions and align with similar functionality in LLVM. The patch enables control over how CFI properties are handled and reported during the linking process, with options for implicit, labeled, and explicit settings, as well as reporting severity.
- proposer
Submits a patch to add RISC-V CFI linker options (`-z zicfilp`, `-z zicfiss`) and reporting flags, following toolchain conventions.
In Details
This patch introduces support for two new RISC-V GNU properties, zicfilp and zicfiss, into the binutils linker. These properties relate to Control Flow Integrity (CFI) mechanisms, specifically for distinguishing between implicit, unlabeled, and always-present CFI information. The patch adds linker flags (-z zicfilp=, -z zicfiss=) and report options to control these properties, aligning binutils with the RISC-V toolchain conventions and the behavior of LLVM's lld.
- RISC-V
- An open-standard Instruction Set Architecture (ISA) based on Reduced Instruction Set Computing principles.
- CFI
- Control Flow Integrity, a security technique that aims to prevent attackers from manipulating the program's control flow.
- linker options
- Flags passed to the linker (e.g.,
ld) to control its behavior during the process of combining object files into an executable or library. - -z
- A common prefix for linker options that control specific aspects of the output file format or linking process.
- GNU properties
- A mechanism in some object file formats (like ELF) to embed specific metadata or attributes about the code, often defined by conventions or standards.
- lld
- The LLVM linker, a high-performance linker developed as part of the LLVM project.