From: Rafael Espindola Date: Thu, 26 Apr 2018 06:10:18 +0000 (+0000) Subject: Add a test. NFC. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=faa3b8a5543d603907842e665935e047d9047123;p=platform%2Fupstream%2Fllvm.git Add a test. NFC. This would have fund a bug in a patch I am working on. llvm-svn: 330925 --- diff --git a/lld/test/ELF/x86-64-tls-ld-local.s b/lld/test/ELF/x86-64-tls-ld-local.s new file mode 100644 index 0000000..6daba63 --- /dev/null +++ b/lld/test/ELF/x86-64-tls-ld-local.s @@ -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@TLSGD(%rip), %rdi + data16 + data16 + rex64 + callq __tls_get_addr@PLT + + leaq bar@TLSLD(%rip), %rdi + callq __tls_get_addr@PLT + leaq bar@DTPOFF(%rax), %rax + + .section .tdata,"awT",@progbits +bar: + .long 42