diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-09-30 03:11:42 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-09-30 03:11:42 +0000 |
commit | a8c02c3bdd68e65d14fb6b0d56989663754059b0 (patch) | |
tree | c373bb5e12b01decbe52b0cb6c7d4fdbf22c3a1c /lib/MC/MachObjectWriter.cpp | |
parent | afd1cc25786f68ca56a63d29ea2bd297990e9f81 (diff) |
Correctly produce R_X86_64_32 or R_X86_64_32S.
With this patch in
movq $foo, foo(%rip)
foo:
.long foo
We produce a R_X86_64_32S for the first relocation and R_X86_64_32 for the
second one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MachObjectWriter.cpp')
-rw-r--r-- | lib/MC/MachObjectWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp index 02a5575606..689aabc333 100644 --- a/lib/MC/MachObjectWriter.cpp +++ b/lib/MC/MachObjectWriter.cpp @@ -28,6 +28,7 @@ #include <vector> using namespace llvm; +// FIXME: this has been copied from (or to) X86AsmBackend.cpp static unsigned getFixupKindLog2Size(unsigned Kind) { switch (Kind) { default: llvm_unreachable("invalid fixup kind!"); @@ -38,6 +39,7 @@ static unsigned getFixupKindLog2Size(unsigned Kind) { case X86::reloc_pcrel_4byte: case X86::reloc_riprel_4byte: case X86::reloc_riprel_4byte_movq_load: + case X86::reloc_signed_4byte: case FK_Data_4: return 2; case FK_Data_8: return 3; } |