[llvm-commits] [llvm] r117548 - in /llvm/trunk: lib/MC/ELFObjectWriter.cpp test/MC/ELF/relocation.s
Rafael Espindola
rafael.espindola at gmail.com
Thu Oct 28 08:11:03 PDT 2010
Author: rafael
Date: Thu Oct 28 10:11:03 2010
New Revision: 117548
URL: http://llvm.org/viewvc/llvm-project?rev=117548&view=rev
Log:
Implement R_X86_64_DTPOFF32.
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=117548&r1=117547&r2=117548&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Thu Oct 28 10:11:03 2010
@@ -728,6 +728,9 @@
case MCSymbolRefExpr::VK_TPOFF:
Type = ELF::R_X86_64_TPOFF32;
break;
+ case MCSymbolRefExpr::VK_DTPOFF:
+ Type = ELF::R_X86_64_DTPOFF32;
+ break;
}
break;
case FK_Data_4:
Modified: llvm/trunk/test/MC/ELF/relocation.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/relocation.s?rev=117548&r1=117547&r2=117548&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/relocation.s (original)
+++ llvm/trunk/test/MC/ELF/relocation.s Thu Oct 28 10:11:03 2010
@@ -13,6 +13,7 @@
leaq foo at TLSGD(%rip), %rax # R_X86_64_TLSGD
leaq foo at TPOFF(%rax), %rax # R_X86_64_TPOFF32
leaq foo at TLSLD(%rip), %rdi # R_X86_64_TLSLD
+ leaq foo at DTPOFF(%rax), %rcx # R_X86_64_DTPOFF32
// CHECK: # Section 0x00000001
// CHECK: (('sh_name', 0x00000001) # '.text'
@@ -83,3 +84,9 @@
// CHECK-NEXT: ('r_sym', 0x00000006)
// CHECK-NEXT: ('r_type', 0x00000014)
// CHECK-NEXT: ('r_addend', 0xfffffffc)
+
+// CHECK: # Relocation 0x0000000a
+// CHECK-NEXT: (('r_offset', 0x00000049)
+// CHECK-NEXT: ('r_sym', 0x00000006)
+// CHECK-NEXT: ('r_type', 0x00000015)
+// CHECK-NEXT: ('r_addend', 0x00000000)
More information about the llvm-commits
mailing list