This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 1/4] Add RISC-V dynamic relocations to elf.h
- From: Palmer Dabbelt <palmer at dabbelt dot com>
- To: libc-alpha at sourceware dot org, joseph at codesourcery dot com, schwab at linux-m68k dot org
- Cc: patches at groups dot riscv dot org, Palmer Dabbelt <palmer at dabbelt dot com>
- Date: Fri, 5 Jan 2018 23:32:28 -0800
- Subject: [PATCH 1/4] Add RISC-V dynamic relocations to elf.h
- Authentication-results: sourceware.org; auth=none
- References: <20180106073231.20491-1-palmer@dabbelt.com>
These relocations can appear in shared objects on RISC-V ELF systems.
---
ChangeLog | 15 +++++++++++++++
elf/elf.h | 14 ++++++++++++++
2 files changed, 29 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 8833b1da335f..d0e02b0b1f43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2018-01-05 Palmer Dabbelt <palmer@sifive.com>
+
+ * elf/elf.h (R_RISCV_NONE): New define.
+ (R_RISCV_32): Likewise.
+ (R_RISCV_64): Likewise.
+ (R_RISCV_RELATIVE): Likewise.
+ (R_RISCV_COPY): Likewise.
+ (R_RISCV_JUMP_SLOT): Likewise.
+ (R_RISCV_TLS_DTPMOD32): Likewise.
+ (R_RISCV_TLS_DTPMOD64): Likewise.
+ (R_RISCV_TLS_DTPREL32): Likewise.
+ (R_RISCV_TLS_DTPREL64): Likewise.
+ (R_RISCV_TLS_TPREL32): Likewise.
+ (R_RISCV_TLS_TPREL64): Likewise.
+
2018-01-06 Samuel Thibault <samuel.thibault@ens-lyon.org>
* sysdeps/mach/hurd/i386/jmp_buf-macros.h: New file.
diff --git a/elf/elf.h b/elf/elf.h
index 01d794601085..031850377bb6 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -3762,6 +3762,20 @@ enum
#define R_TILEGX_NUM 130
+/* RISC-V relocations. */
+#define R_RISCV_NONE 0
+#define R_RISCV_32 1
+#define R_RISCV_64 2
+#define R_RISCV_RELATIVE 3
+#define R_RISCV_COPY 4
+#define R_RISCV_JUMP_SLOT 5
+#define R_RISCV_TLS_DTPMOD32 6
+#define R_RISCV_TLS_DTPMOD64 7
+#define R_RISCV_TLS_DTPREL32 8
+#define R_RISCV_TLS_DTPREL64 9
+#define R_RISCV_TLS_TPREL32 10
+#define R_RISCV_TLS_TPREL64 11
+
/* BPF specific declarations. */
#define R_BPF_NONE 0 /* No reloc */
--
2.13.6