This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch 1/2] Add Mach-O x86-64 relocations
- From: Tristan Gingold <gingold at adacore dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Mon, 11 Jan 2010 17:15:32 +0100
- Subject: [Patch 1/2] Add Mach-O x86-64 relocations
Hi,
this patch adds Mach-O x86-64 relocations to reloc.c. Unfortunately even if Mach-O x86-64 relies on
the ELF ABI, we can't share many relocations.
Ok to commit ?
Tristan.
bfd/
2010-01-08 Tristan Gingold <gingold@adacore.com>
* reloc.c: Add MACH_O_X86_64 relocations.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
---
bfd/reloc.c | 47 ++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 0ea7a85..9451740 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -5235,14 +5235,51 @@ ENUMDOC
Lattice Mico32 relocations.
ENUM
- BFD_RELOC_MACH_O_SECTDIFF
+ BFD_RELOC_MACH_O_SECTDIFF
ENUMDOC
- Difference between two section addreses. Must be followed by a
- BFD_RELOC_MACH_O_PAIR.
+ Difference between two section addreses. Must be followed by a
+ BFD_RELOC_MACH_O_PAIR.
ENUM
- BFD_RELOC_MACH_O_PAIR
+ BFD_RELOC_MACH_O_PAIR
ENUMDOC
- Mach-O generic relocations.
+ Pair of relocation. Contains the first symbol.
+
+ENUM
+ BFD_RELOC_MACH_O_X86_64_BRANCH32
+ENUMX
+ BFD_RELOC_MACH_O_X86_64_BRANCH8
+ENUMDOC
+ PCREL relocations. They are marked as branch to create PLT entry if
+ required.
+ENUM
+ BFD_RELOC_MACH_O_X86_64_GOT
+ENUMDOC
+ Used when referencing a GOT entry.
+ENUM
+ BFD_RELOC_MACH_O_X86_64_GOT_LOAD
+ENUMDOC
+ Used when loading a GOT entry with movq. It is specially marked so that
+ the linker could optimize the movq to a leaq if possible.
+ENUM
+ BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32
+ENUMDOC
+ Symbol will be substracted. Must be followed by a BFD_RELOC_64.
+ENUM
+ BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64
+ENUMDOC
+ Symbol will be substracted. Must be followed by a BFD_RELOC_64.
+ENUM
+ BFD_RELOC_MACH_O_X86_64_PCREL32_1
+ENUMDOC
+ Same as BFD_RELOC_32_PCREL but with an implicit -1 addend.
+ENUM
+ BFD_RELOC_MACH_O_X86_64_PCREL32_2
+ENUMDOC
+ Same as BFD_RELOC_32_PCREL but with an implicit -2 addend.
+ENUM
+ BFD_RELOC_MACH_O_X86_64_PCREL32_4
+ENUMDOC
+ Same as BFD_RELOC_32_PCREL but with an implicit -4 addend.
ENUM
BFD_RELOC_MICROBLAZE_32_LO
--
1.6.2