]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update RISC-V relocations
authorAndreas Schwab <schwab@suse.de>
Mon, 16 Oct 2023 11:13:17 +0000 (13:13 +0200)
committerAndreas Schwab <schwab@suse.de>
Wed, 28 May 2025 07:40:33 +0000 (09:40 +0200)
Update the list of RISC-V relocations from the ELF psABI as of June 2024.
It removes binutils-internal only relocations that were never part of
actual object files.  The GNU_VTINHERIT and GNU_VTENTRY relocations were
never used because the corresponding GCC option -fvtable-gc was never
supported on RISC-V.

elf/elf.h

index 1e1a59c14d2eb5516e50261d02dc490085e24b2c..2f29a47c0bb8c43d2ed0f8faab60dc8840b3f495 100644 (file)
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -4081,6 +4081,7 @@ enum
 #define R_RISCV_TLS_DTPREL64    9
 #define R_RISCV_TLS_TPREL32    10
 #define R_RISCV_TLS_TPREL64    11
+#define R_RISCV_TLSDESC                12
 #define R_RISCV_BRANCH         16
 #define R_RISCV_JAL            17
 #define R_RISCV_CALL           18
@@ -4106,16 +4107,10 @@ enum
 #define R_RISCV_SUB16          38
 #define R_RISCV_SUB32          39
 #define R_RISCV_SUB64          40
-#define R_RISCV_GNU_VTINHERIT  41
-#define R_RISCV_GNU_VTENTRY    42
+#define R_RISCV_GOT32_PCREL    41
 #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
@@ -4127,8 +4122,12 @@ enum
 #define R_RISCV_PLT32          59
 #define R_RISCV_SET_ULEB128    60
 #define R_RISCV_SUB_ULEB128    61
+#define R_RISCV_TLSDESC_HI20   62
+#define R_RISCV_TLSDESC_LOAD_LO12 63
+#define R_RISCV_TLSDESC_ADD_LO12 64
+#define R_RISCV_TLSDESC_CALL   65
 
-#define R_RISCV_NUM            62
+#define R_RISCV_NUM            66
 
 /* RISC-V specific values for the st_other field.  */
 #define STO_RISCV_VARIANT_CC   0x80    /* Function uses variant calling
@@ -4137,7 +4136,7 @@ enum
 /* RISC-V specific values for the sh_type field.  */
 #define SHT_RISCV_ATTRIBUTES   (SHT_LOPROC + 3)
 
-/* RISC-V specific values for the p_type field.  */
+/* RISC-V specific values for the p_type field (deprecated).  */
 #define PT_RISCV_ATTRIBUTES    (PT_LOPROC + 3)
 
 /* RISC-V specific values for the d_tag field.  */