public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Update RISC-V relocations
@ 2024-01-23 16:25 Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2024-01-23 16:25 UTC (permalink / raw)
  To: libc-alpha

This updates the list of RISC-V relocations from the ELF psABI as of 2023.
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 | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/elf/elf.h b/elf/elf.h
index 455731663c..2e531254d6 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -4076,6 +4076,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
@@ -4101,16 +4102,13 @@ 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_GPREL_LO12_I	47
+#define R_RISCV_GPREL_LO12_S	48
+#define R_RISCV_GPREL_HI20	49
 #define R_RISCV_RELAX		51
 #define R_RISCV_SUB6		52
 #define R_RISCV_SET6		53
@@ -4122,8 +4120,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
-- 
2.43.0


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] Update RISC-V relocations
@ 2024-06-11  8:12 Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2024-06-11  8:12 UTC (permalink / raw)
  To: libc-alpha

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 | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/elf/elf.h b/elf/elf.h
index 33aea7f743..ac3b73a00b 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -4088,6 +4088,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
@@ -4113,16 +4114,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
@@ -4134,8 +4129,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
@@ -4144,7 +4143,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.  */
-- 
2.45.2


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-11  8:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-23 16:25 [PATCH] Update RISC-V relocations Andreas Schwab
2024-06-11  8:12 Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).