[lld] r330925 - Add a test. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 25 23:10:18 PDT 2018
Author: rafael
Date: Wed Apr 25 23:10:18 2018
New Revision: 330925
URL: http://llvm.org/viewvc/llvm-project?rev=330925&view=rev
Log:
Add a test. NFC.
This would have fund a bug in a patch I am working on.
Added:
lld/trunk/test/ELF/x86-64-tls-ld-local.s
Added: lld/trunk/test/ELF/x86-64-tls-ld-local.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/x86-64-tls-ld-local.s?rev=330925&view=auto
==============================================================================
--- lld/trunk/test/ELF/x86-64-tls-ld-local.s (added)
+++ lld/trunk/test/ELF/x86-64-tls-ld-local.s Wed Apr 25 23:10:18 2018
@@ -0,0 +1,29 @@
+// REQUIRES: x86
+// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
+// RUN: ld.lld %t.o -o %t.so -shared
+// RUN: llvm-readobj -r -s %t.so | FileCheck %s
+
+// CHECK: Relocations [
+// CHECK-NEXT: Section ({{.*}}) .rela.dyn {
+// CHECK-NEXT: R_X86_64_DTPMOD64 - 0x0
+// CHECK-NEXT: R_X86_64_DTPMOD64 - 0x0
+// CHECK-NEXT: }
+// CHECK-NEXT: Section ({{.*}}) .rela.plt {
+// CHECK-NEXT: R_X86_64_JUMP_SLOT __tls_get_addr 0x0
+// CHECK-NEXT: }
+// CHECK-NEXT: ]
+
+ data16
+ leaq bar at TLSGD(%rip), %rdi
+ data16
+ data16
+ rex64
+ callq __tls_get_addr at PLT
+
+ leaq bar at TLSLD(%rip), %rdi
+ callq __tls_get_addr at PLT
+ leaq bar at DTPOFF(%rax), %rax
+
+ .section .tdata,"awT", at progbits
+bar:
+ .long 42
More information about the llvm-commits
mailing list