[llvm-commits] [llvm] r122658 - in /llvm/trunk: lib/MC/ELFObjectWriter.cpp test/MC/ELF/relocation.s
Rafael Espindola
rafael.espindola at gmail.com
Sat Jan 1 11:05:35 PST 2011
Author: rafael
Date: Sat Jan 1 13:05:35 2011
New Revision: 122658
URL: http://llvm.org/viewvc/llvm-project?rev=122658&view=rev
Log:
Fix PR8878.
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=122658&r1=122657&r2=122658&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Sat Jan 1 13:05:35 2011
@@ -1610,6 +1610,7 @@
assert(Modifier == MCSymbolRefExpr::VK_None);
Type = ELF::R_X86_64_PC64;
break;
+ case X86::reloc_signed_4byte:
case X86::reloc_riprel_4byte_movq_load:
case FK_Data_4: // FIXME?
case X86::reloc_riprel_4byte:
Modified: llvm/trunk/test/MC/ELF/relocation.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/relocation.s?rev=122658&r1=122657&r2=122658&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/relocation.s (original)
+++ llvm/trunk/test/MC/ELF/relocation.s Sat Jan 1 13:05:35 2011
@@ -16,6 +16,7 @@
leaq foo at DTPOFF(%rax), %rcx # R_X86_64_DTPOFF32
pushq $bar
movq foo(%rip), %rdx
+ leaq foo-bar(%r14),%r14
// CHECK: # Section 0x00000001
@@ -105,3 +106,9 @@
// CHECK-NEXT: ('r_sym', 0x00000006)
// CHECK-NEXT: ('r_type', 0x00000002)
// CHECK-NEXT: ('r_addend', 0xfffffffc)
+
+// CHECK: # Relocation 0x0000000d
+// CHECK-NEXT: (('r_offset', 0x0000005c)
+// CHECK-NEXT: ('r_sym', 0x00000006)
+// CHECK-NEXT: ('r_type', 0x00000002)
+// CHECK-NEXT: ('r_addend', 0x0000005c)
More information about the llvm-commits
mailing list