From c9207d3d11a5f57cdd399db1b38e0d53dedf955e Mon Sep 17 00:00:00 2001 From: Mitchell Horne Date: Fri, 28 Jun 2019 00:03:29 +0000 Subject: [PATCH] Add some missing RISC-V ELF defines This adds defines for the RISC-V specific e_flags values, and some of the missing static relocations. Reviewed by: markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D20766 --- sys/sys/elf_common.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 6232756fa06e..538ae4eb2db3 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -369,6 +369,15 @@ typedef struct { #define EF_PPC_RELOCATABLE 0x00010000 #define EF_PPC_RELOCATABLE_LIB 0x00008000 +#define EF_RISCV_RVC 0x00000001 +#define EF_RISCV_FLOAT_ABI_MASK 0x00000006 +#define EF_RISCV_FLOAT_ABI_SOFT 0x00000000 +#define EF_RISCV_FLOAT_ABI_SINGLE 0x000002 +#define EF_RISCV_FLOAT_ABI_DOUBLE 0x000004 +#define EF_RISCV_FLOAT_ABI_QUAD 0x00000006 +#define EF_RISCV_RVE 0x00000008 +#define EF_RISCV_TSO 0x00000010 + #define EF_SPARC_EXT_MASK 0x00ffff00 #define EF_SPARC_32PLUS 0x00000100 #define EF_SPARC_SUN_US1 0x00000200 @@ -1310,6 +1319,17 @@ typedef struct { #define R_RISCV_ALIGN 43 #define R_RISCV_RVC_BRANCH 44 #define R_RISCV_RVC_JUMP 45 +#define R_RISCV_RVC_LUI 46 +#define R_RISCV_GPREL_I 47 +#define R_RISCV_GPREL_S 48 +#define R_RISCV_TPREL_I 49 +#define R_RISCV_TPREL_S 50 +#define R_RISCV_RELAX 51 +#define R_RISCV_SUB6 52 +#define R_RISCV_SET6 53 +#define R_RISCV_SET8 54 +#define R_RISCV_SET16 55 +#define R_RISCV_SET32 56 #define R_SPARC_NONE 0 #define R_SPARC_8 1