[binutils-gdb] readelf: add support for more RISC-V note types
Jan Beulich
jbeulich@sourceware.org
Fri Sep 11 11:48:13 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=979661c1e51aa4c65f1130e0fa3af53a9e793b43
commit 979661c1e51aa4c65f1130e0fa3af53a9e793b43
Author: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Date: Fri Sep 11 13:41:42 2026 +0200
readelf: add support for more RISC-V note types
Add definitions and string values for note types
* NT_RISCV_VECTOR 0x901
* NT_RISCV_TAGGED_ADDR_CTRL 0x902
* NT_RISCV_USER_CFI 0x903
The constants are defined in Linux' tools/include/uapi/linux/elf.h.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diff:
---
binutils/readelf.c | 6 ++++++
include/elf/common.h | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 7a169bb3997..4fb9d8cbd5f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -21514,6 +21514,12 @@ get_note_type (Filedata * filedata, unsigned e_type)
return _("NT_ARC_V2 (ARC HS accumulator/extra registers)");
case NT_RISCV_CSR:
return _("NT_RISCV_CSR (RISC-V control and status registers)");
+ case NT_RISCV_VECTOR:
+ return _("NT_RISCV_VECTOR (RISC-V vector registers)");
+ case NT_RISCV_TAGGED_ADDR_CTRL:
+ return _("NT_RISCV_TAGGED_ADDR_CTRL (RISC-V tagged address control (prctl()))");
+ case NT_RISCV_USER_CFI:
+ return _("NT_RISCV_USER_CFI (RISC-V shadow stack state)");
case NT_PSTATUS:
return _("NT_PSTATUS (pstatus structure)");
case NT_FPREGS:
diff --git a/include/elf/common.h b/include/elf/common.h
index f811b8daeb5..14582d2385f 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -783,6 +783,12 @@
/* note name must be "LINUX". */
#define NT_RISCV_CSR 0x900 /* RISC-V Control and Status Registers */
/* note name must be "LINUX". */
+#define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */
+ /* note name must be "LINUX". */
+#define NT_RISCV_TAGGED_ADDR_CTRL 0x902 /* RISC-V tagged address control (prctl()) */
+ /* note name must be "LINUX". */
+#define NT_RISCV_USER_CFI 0x903 /* RISC-V shadow stack state */
+ /* note name must be "LINUX". */
#define NT_SIGINFO 0x53494749 /* Fields of siginfo_t. */
#define NT_FILE 0x46494c45 /* Description of mapped files. */
More information about the Binutils-cvs
mailing list