[PATCH 1/1] readelf: add support for more RISC-V note types
Heinrich Schuchardt
heinrich.schuchardt@canonical.com
Wed Sep 9 05:57:07 GMT 2026
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>
---
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..6c5bf777248 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. */
--
2.53.0
More information about the Binutils
mailing list