diff options
author | Tristan Gingold <gingold@adacore.com> | 2012-01-04 12:59:23 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2012-01-04 12:59:23 +0000 |
commit | 71141310f5b64e62555792867496b1d580c582f0 (patch) | |
tree | 825a22c206780c2132bc75155078963f088770e7 /bfd/mach-o-x86-64.c | |
parent | 8645ff697e0fb097d2b341d5d50dedddf30f9692 (diff) | |
download | fsf-binutils-gdb-71141310f5b64e62555792867496b1d580c582f0.zip fsf-binutils-gdb-71141310f5b64e62555792867496b1d580c582f0.tar.gz fsf-binutils-gdb-71141310f5b64e62555792867496b1d580c582f0.tar.bz2 |
2012-01-04 Tristan Gingold <gingold@adacore.com>
* mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
BFD_RELOC_MACH_O_X86_64_PCREL32_2,
BFD_RELOC_MACH_O_X86_64_PCREL32_4,
BFD_RELOC_MACH_O_X86_64_BRANCH32,
BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
BFD_RELOC_MACH_O_X86_64_GOT.
Diffstat (limited to 'bfd/mach-o-x86-64.c')
-rw-r--r-- | bfd/mach-o-x86-64.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/bfd/mach-o-x86-64.c b/bfd/mach-o-x86-64.c index cc31a1c..48e51e2 100644 --- a/bfd/mach-o-x86-64.c +++ b/bfd/mach-o-x86-64.c @@ -224,21 +224,56 @@ bfd_mach_o_x86_64_swap_reloc_out (arelent *rel, bfd_mach_o_reloc_info *rinfo) rinfo->r_scattered = 0; switch (rel->howto->type) { + case BFD_RELOC_32: + rinfo->r_type = BFD_MACH_O_X86_64_RELOC_UNSIGNED; + rinfo->r_pcrel = 0; + rinfo->r_length = 2; + break; case BFD_RELOC_64: rinfo->r_type = BFD_MACH_O_X86_64_RELOC_UNSIGNED; rinfo->r_pcrel = 0; rinfo->r_length = 3; break; case BFD_RELOC_32_PCREL: + rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SIGNED; + rinfo->r_pcrel = 1; + rinfo->r_length = 2; + break; + case BFD_RELOC_MACH_O_X86_64_PCREL32_1: + rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SIGNED_1; + rinfo->r_pcrel = 1; + rinfo->r_length = 2; + break; + case BFD_RELOC_MACH_O_X86_64_PCREL32_2: + rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SIGNED_2; + rinfo->r_pcrel = 1; + rinfo->r_length = 2; + break; + case BFD_RELOC_MACH_O_X86_64_PCREL32_4: + rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SIGNED_4; + rinfo->r_pcrel = 1; + rinfo->r_length = 2; + break; + case BFD_RELOC_MACH_O_X86_64_BRANCH32: rinfo->r_type = BFD_MACH_O_X86_64_RELOC_BRANCH; rinfo->r_pcrel = 1; rinfo->r_length = 2; break; + case BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32: + rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SUBTRACTOR; + rinfo->r_pcrel = 0; + rinfo->r_length = 2; + break; case BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64: rinfo->r_type = BFD_MACH_O_X86_64_RELOC_SUBTRACTOR; rinfo->r_pcrel = 0; rinfo->r_length = 3; break; + case BFD_RELOC_MACH_O_X86_64_GOT: + rinfo->r_type = BFD_MACH_O_X86_64_RELOC_GOT; + rinfo->r_pcrel = 1; + rinfo->r_length = 2; + break; case BFD_RELOC_MACH_O_X86_64_GOT_LOAD: rinfo->r_type = BFD_MACH_O_X86_64_RELOC_GOT_LOAD; rinfo->r_pcrel = 1; |