[lld] r260384 - Add support for R_X86_64_DTPOFF64.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 08:26:32 PST 2016


Author: rafael
Date: Wed Feb 10 10:26:31 2016
New Revision: 260384

URL: http://llvm.org/viewvc/llvm-project?rev=260384&view=rev
Log:
Add support for R_X86_64_DTPOFF64.

It is used by clang to produce debug info for tls variables.

Modified:
    lld/trunk/ELF/Target.cpp
    lld/trunk/test/ELF/tls-dynamic.s

Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=260384&r1=260383&r2=260384&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Wed Feb 10 10:26:31 2016
@@ -872,6 +872,9 @@ void X86_64TargetInfo::relocateOne(uint8
   case R_X86_64_DTPOFF32:
     write32le(Loc, SA);
     break;
+  case R_X86_64_DTPOFF64:
+    write64le(Loc, SA);
+    break;
   case R_X86_64_GOTPCREL:
   case R_X86_64_PC32:
   case R_X86_64_PLT32:

Modified: lld/trunk/test/ELF/tls-dynamic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/tls-dynamic.s?rev=260384&r1=260383&r2=260384&view=diff
==============================================================================
--- lld/trunk/test/ELF/tls-dynamic.s (original)
+++ lld/trunk/test/ELF/tls-dynamic.s Wed Feb 10 10:26:31 2016
@@ -18,6 +18,9 @@
   // Initial Exec Model Code Sequence, II
   movq c at gottpoff(%rip),%rax
   movq %fs:(%rax),%rax
+  movabs $a at dtpoff, %rax
+  movabs $b at dtpoff, %rax
+  movabs $c at dtpoff, %rax
 
   .global a
   .hidden a
@@ -79,3 +82,6 @@ c:
 // DIS-NEXT:     103b: {{.+}} leaq    8(%rax), %rcx
 // DIS-NEXT:     1042: {{.+}} movq    4263(%rip), %rax
 // DIS-NEXT:     1049: {{.+}} movq    %fs:(%rax), %rax
+// DIS-NEXT:     104d: {{.+}} movabsq $0, %rax
+// DIS-NEXT:     1057: {{.+}} movabsq $4, %rax
+// DIS-NEXT:     1061: {{.+}} movabsq $8, %rax




More information about the llvm-commits mailing list