]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Add new i386 and x86_64 relocation types.
authorMark Wielaard <mjw@redhat.com>
Thu, 28 Jan 2016 12:59:20 +0000 (13:59 +0100)
committerMark Wielaard <mjw@redhat.com>
Fri, 19 Feb 2016 20:13:23 +0000 (21:13 +0100)
Update elf.h from glibc and recognize R_386_GOT32X, R_X86_64_GOTPCRELX
and R_x86_64_REX_GOTPCRELX as non-dynamic relocations.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
backends/ChangeLog
backends/i386_reloc.def
backends/x86_64_reloc.def
libelf/ChangeLog
libelf/elf.h

index 302646f195fc59491504fa2d06b9df165f7c2781..d222266338a5632051e037bf25a1924c5e341c85 100644 (file)
@@ -1,3 +1,8 @@
+2015-12-28  Mark Wielaard  <mjw@redhat.com>
+
+       * i386_reloc.def: Add GOT32X.
+       * x86_64_reloc.def: Add GOTPCRELX and REX_GOTPCRELX.
+
 2016-02-12  Mark Wielaard  <mjw@redhat.com>
 
        * aarch64_corenote.c (aarch64_syscall_items): New Ebl_Core_Item[].
index de3575d2fe2d17ba309a876bdb7f5f616beddf43..a6a03f32a2251e5c5cbc96a339ad2ce419d25719 100644 (file)
@@ -68,3 +68,4 @@ RELOC_TYPE (TLS_GOTDESC,      REL)
 RELOC_TYPE (TLS_DESC_CALL,     REL)
 RELOC_TYPE (TLS_DESC,          EXEC)
 RELOC_TYPE (IRELATIVE,         EXEC|DYN)
+RELOC_TYPE (GOT32X,            REL)
index ad84efa138d17f745c6ff8adabbcb49445b2e5a8..07a7c3d75b22aa34ddcd8a641e1badc4a70dc0a6 100644 (file)
@@ -61,3 +61,5 @@ RELOC_TYPE (GOTPC32_TLSDESC, REL)
 RELOC_TYPE (TLSDESC_CALL, REL)
 RELOC_TYPE (TLSDESC,   REL|EXEC|DYN)
 RELOC_TYPE (IRELATIVE, EXEC|DYN)
+RELOC_TYPE (GOTPCRELX, REL)
+RELOC_TYPE (REX_GOTPCRELX, REL)
index 10e227e768b9cc398c59d266aafe4dcec73f1b95..b9669239f9d5545902616373e28cac3ab49d6f5a 100644 (file)
@@ -1,3 +1,7 @@
+2016-01-28  Mark Wielaard  <mjw@redhat.com>
+
+       * elf.h: Update from glibc. Add new i386 and x86_64 relocations.
+
 2016-02-12  Mark Wielaard  <mjw@redhat.com>
 
        * elf.h: Update from glibc. Add NT_ARM_SYSTEM_CALL.
index 0240c3cf61ca5dd1d5827cc798222e8b8bd8e9b0..ce96bd5d334767da038d550e15cd1860e1c58d8e 100644 (file)
@@ -1,5 +1,5 @@
 /* This file defines standard ELF types, structures, and macros.
-   Copyright (C) 1995-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -1270,8 +1270,10 @@ typedef struct
                                           argument, returning the TLS
                                           offset for the symbol.  */
 #define R_386_IRELATIVE           42           /* Adjust indirectly by program base */
+#define R_386_GOT32X      43           /* Load from 32 bit GOT entry,
+                                          relaxable. */
 /* Keep this the last entry.  */
-#define R_386_NUM         43
+#define R_386_NUM         44
 
 /* SUN SPARC specific definitions.  */
 
@@ -1728,7 +1730,11 @@ typedef struct
    PLT is writable.  For a non-writable PLT, this is omitted or has a zero
    value.  */
 #define DT_MIPS_RWPLT        0x70000034
-#define DT_MIPS_NUM         0x35
+/* An alternative description of the classic MIPS RLD_MAP that is usable
+   in a PIE as it stores a relative offset from the address of the tag
+   rather than an absolute address.  */
+#define DT_MIPS_RLD_MAP_REL  0x70000035
+#define DT_MIPS_NUM         0x36
 
 /* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry.  */
 
@@ -3141,8 +3147,15 @@ enum
 #define R_X86_64_TLSDESC        36     /* TLS descriptor.  */
 #define R_X86_64_IRELATIVE     37      /* Adjust indirectly by program base */
 #define R_X86_64_RELATIVE64    38      /* 64-bit adjust by program base */
-
-#define R_X86_64_NUM           39
+                                       /* 39 Reserved was R_X86_64_PC32_BND */
+                                       /* 40 Reserved was R_X86_64_PLT32_BND */
+#define R_X86_64_GOTPCRELX     41      /* Load from 32 bit signed pc relative
+                                          offset to GOT entry without REX
+                                          prefix, relaxable.  */
+#define R_X86_64_REX_GOTPCRELX 42      /* Load from 32 bit signed pc relative
+                                          offset to GOT entry with REX prefix,
+                                          relaxable.  */
+#define R_X86_64_NUM           43
 
 
 /* AM33 relocations.  */