[llvm-commits] [llvm] r122579 - in /llvm/trunk: lib/MC/ELFObjectWriter.cpp test/MC/ELF/relocation.s
Rafael Espindola
rafael.espindola at gmail.com
Sun Dec 26 18:03:24 PST 2010
Author: rafael
Date: Sun Dec 26 20:03:24 2010
New Revision: 122579
URL: http://llvm.org/viewvc/llvm-project?rev=122579&view=rev
Log:
Handle reloc_riprel_4byte_movq_load. Should make the bots happy.
Modified:
llvm/trunk/lib/MC/ELFObjectWriter.cpp
llvm/trunk/test/MC/ELF/relocation.s
Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=122579&r1=122578&r2=122579&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Sun Dec 26 20:03:24 2010
@@ -1610,6 +1610,7 @@
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:
Modified: llvm/trunk/test/MC/ELF/relocation.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/relocation.s?rev=122579&r1=122578&r2=122579&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/relocation.s (original)
+++ llvm/trunk/test/MC/ELF/relocation.s Sun Dec 26 20:03:24 2010
@@ -15,6 +15,7 @@
leaq foo at TLSLD(%rip), %rdi # R_X86_64_TLSLD
leaq foo at DTPOFF(%rax), %rcx # R_X86_64_DTPOFF32
pushq $bar
+ movq foo(%rip), %rdx
// CHECK: # Section 0x00000001
@@ -98,3 +99,9 @@
// 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)
More information about the llvm-commits
mailing list