aboutsummaryrefslogtreecommitdiff
path: root/include/coff/x86_64.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-03-02 12:06:14 +1030
committerAlan Modra <amodra@gmail.com>2021-03-03 17:46:24 +1030
commitdc83f2d20e964f9a7fd9a97ba9d3950b908752a1 (patch)
treeb2655d6a19d07021558a1151bf85ae70194768a6 /include/coff/x86_64.h
parentca87bad0e90e53de2f6509939c45cd7434329a49 (diff)
downloadbinutils-dc83f2d20e964f9a7fd9a97ba9d3950b908752a1.zip
binutils-dc83f2d20e964f9a7fd9a97ba9d3950b908752a1.tar.gz
binutils-dc83f2d20e964f9a7fd9a97ba9d3950b908752a1.tar.bz2
Split relocation defines out of coff/internal.h
include/ * coff/internal.h: Delete obsolete relocation defines. Move used relocation defines.. * coff/i386.h: ..to here.. * coff/ti.h: ..and here.. * coff/x86_64.h: ..and here.. * coff/z80.h: ..and here.. * coff/z8k.h: ..and here. bfd/ * reloc.c: Include x86_64.h rather than internal.h.
Diffstat (limited to 'include/coff/x86_64.h')
-rw-r--r--include/coff/x86_64.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/coff/x86_64.h b/include/coff/x86_64.h
index 583b7df..4d3e6e7 100644
--- a/include/coff/x86_64.h
+++ b/include/coff/x86_64.h
@@ -75,3 +75,32 @@ struct external_reloc
#define RELOC struct external_reloc
#define RELSZ 10
+
+/* X86-64 relocations. */
+#define R_AMD64_ABS 0 /* Reference is absolute, no relocation is necessary. */
+#define R_AMD64_DIR64 1 /* 64-bit address (VA). */
+#define R_AMD64_DIR32 2 /* 32-bit address (VA) R_DIR32. */
+#define R_AMD64_IMAGEBASE 3 /* 32-bit absolute ref w/o base R_IMAGEBASE. */
+#define R_AMD64_PCRLONG 4 /* 32-bit relative address from byte following reloc R_PCRLONG. */
+#define R_AMD64_PCRLONG_1 5 /* 32-bit relative address from byte distance 1 from reloc. */
+#define R_AMD64_PCRLONG_2 6 /* 32-bit relative address from byte distance 2 from reloc. */
+#define R_AMD64_PCRLONG_3 7 /* 32-bit relative address from byte distance 3 from reloc. */
+#define R_AMD64_PCRLONG_4 8 /* 32-bit relative address from byte distance 4 from reloc. */
+#define R_AMD64_PCRLONG_5 9 /* 32-bit relative address from byte distance 5 from reloc. */
+#define R_AMD64_SECTION 10 /* Section index. */
+#define R_AMD64_SECREL 11 /* 32 bit offset from base of section containing target R_SECREL. */
+#define R_AMD64_SECREL7 12 /* 7 bit unsigned offset from base of section containing target. */
+#define R_AMD64_TOKEN 13 /* 32 bit metadata token. */
+#define R_AMD64_PCRQUAD 14 /* Pseude PC64 relocation - Note: not specified by MS/AMD but need for gas pc-relative 64bit wide relocation generated by ELF. */
+
+/* i386 Relocations. */
+
+#define R_DIR32 6
+#define R_IMAGEBASE 7
+#define R_SECREL32 11
+#define R_RELBYTE 15
+#define R_RELWORD 16
+#define R_RELLONG 17
+#define R_PCRBYTE 18
+#define R_PCRWORD 19
+#define R_PCRLONG 20