From: Andreas Schwab <schwab@suse.de>
To: libc-alpha@sourceware.org
Subject: [PATCH v2] Update RISC-V relocations
Date: Tue, 16 Apr 2024 11:45:37 +0200 [thread overview]
Message-ID: <mvmmspt7i9q.fsf@suse.de> (raw)
This updates the list of RISC-V relocations from the ELF psABI as of Apr
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.
---
v2: Remove GPREL relocations. They were recently removed again from the
ABI, as they are only supposed to be linker-internal.
---
elf/elf.h | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/elf/elf.h b/elf/elf.h
index 55b2e87860..6a4e1d7512 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -4080,6 +4080,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
@@ -4105,16 +4106,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
@@ -4126,8 +4121,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.44.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."
reply other threads:[~2024-04-16 9:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mvmmspt7i9q.fsf@suse.de \
--to=schwab@suse.de \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).