diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-27 02:03:24 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-12-27 02:03:24 +0000 |
commit | c3a561cb8ed6f04e3cf7b1ff38c9f51a695d196d (patch) | |
tree | 0e6bdbebccbda7bc9610a52294cd602cf75a9c6b | |
parent | 3a83c40ab61d5ca624f2bbadd70237c6adbdb304 (diff) |
Handle reloc_riprel_4byte_movq_load. Should make the bots happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122579 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/MC/ELFObjectWriter.cpp | 1 | ||||
-rw-r--r-- | test/MC/ELF/relocation.s | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp index 88c7200734..c4e2e3f390 100644 --- a/lib/MC/ELFObjectWriter.cpp +++ b/lib/MC/ELFObjectWriter.cpp @@ -1610,6 +1610,7 @@ unsigned X86ELFObjectWriter::GetRelocType(const MCValue &Target, assert(Modifier == MCSymbolRefExpr::VK_None); Type = ELF::R_X86_64_PC64; break; + case X86::reloc_riprel_4byte_movq_load: case FK_Data_4: // FIXME? case X86::reloc_riprel_4byte: case FK_PCRel_4: diff --git a/test/MC/ELF/relocation.s b/test/MC/ELF/relocation.s index a3ad5268b4..ea27214b8a 100644 --- a/test/MC/ELF/relocation.s +++ b/test/MC/ELF/relocation.s @@ -15,6 +15,7 @@ bar: leaq foo@TLSLD(%rip), %rdi # R_X86_64_TLSLD leaq foo@DTPOFF(%rax), %rcx # R_X86_64_DTPOFF32 pushq $bar + movq foo(%rip), %rdx // CHECK: # Section 0x00000001 @@ -98,3 +99,9 @@ bar: // CHECK-NEXT: ('r_sym', 0x00000002) // CHECK-NEXT: ('r_type', 0x0000000b) // CHECK-NEXT: ('r_addend', 0x00000000) + +// CHECK: # Relocation 0x0000000c +// CHECK-NEXT: (('r_offset', 0x00000055) +// CHECK-NEXT: ('r_sym', 0x00000006) +// CHECK-NEXT: ('r_type', 0x00000002) +// CHECK-NEXT: ('r_addend', 0xfffffffc) |