From: John Baldwin Date: Mon, 2 Mar 2020 18:49:02 +0000 (-0800) Subject: Add CHERI-RISC-V ELF header flags. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e23b94e2937713acdf368220f88bf7b581e656a;p=thirdparty%2Fbinutils-gdb.git Add CHERI-RISC-V ELF header flags. --- diff --git a/binutils/readelf.c b/binutils/readelf.c index 87f88fe371b..3d0024e069b 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -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: diff --git a/include/elf/riscv.h b/include/elf/riscv.h index d0acf6886d8..34b02f05448 100644 --- a/include/elf/riscv.h +++ b/include/elf/riscv.h @@ -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$"