1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3// RUN: ld.lld --hash-style=sysv %t -o %tout -shared
4// RUN: llvm-readobj -r %tout | FileCheck %s
5
6 data16
7 leaq   g_tls_s@TLSGD(%rip), %rdi
8 data16
9 data16
10 rex64
11 callq  __tls_get_addr@PLT
12
13 data16
14 leaq   g_tls_s@TLSGD(%rip), %rdi
15 data16
16 data16
17 rex64
18 callq  __tls_get_addr@PLT
19
20// Check that we handle two gd relocations to the same symbol.
21
22// CHECK:      Relocations [
23// CHECK-NEXT:   Section (4) .rela.dyn {
24// CHECK-NEXT:     R_X86_64_DTPMOD64 g_tls_s 0x0
25// CHECK-NEXT:     R_X86_64_DTPOFF64 g_tls_s 0x0
26// CHECK-NEXT:   }
27// CHECK-NEXT:   Section (5) .rela.plt {
28// CHECK-NEXT:      R_X86_64_JUMP_SLOT __tls_get_addr 0x0
29// CHECK-NEXT:   }
30// CHECK-NEXT: ]
31