]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add CHERI-RISC-V ELF header flags.
authorJohn Baldwin <jhb@FreeBSD.org>
Mon, 2 Mar 2020 18:49:02 +0000 (10:49 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Tue, 11 Oct 2022 21:09:01 +0000 (14:09 -0700)
binutils/readelf.c
include/elf/riscv.h

index 87f88fe371b5e101bcbf44e20d58fa8d77f76e68..3d0024e069b561a585ccbfb5daf2cd0757981924 100644 (file)
@@ -4153,6 +4153,12 @@ get_machine_flags (Filedata * filedata, unsigned e_flags, unsigned e_machine)
              strcat (buf, ", quad-float ABI");
              break;
            }
+
+         if (e_flags & EF_RISCV_CHERIABI)
+           strcat (buf, ", CheriABI");
+
+         if (e_flags & EF_RISCV_CAPMODE)
+           strcat (buf, ", capmode");
          break;
 
        case EM_SH:
index d0acf6886d800d5e118ef2b6d4172d49c7933213..34b02f05448f78adf2dc9ffad58538152cc31621 100644 (file)
@@ -114,6 +114,12 @@ END_RELOC_NUMBERS (R_RISCV_max)
 /* File uses the 32E base integer instruction.  */
 #define EF_RISCV_RVE 0x0008
 
+/* File uses CheriABI.  */
+#define EF_RISCV_CHERIABI 0x00010000
+
+/* File uses capability mode encodings.  */
+#define EF_RISCV_CAPMODE 0x00020000
+
 /* The name of the global pointer symbol.  */
 #define RISCV_GP_SYMBOL "__global_pointer$"