2 # Check handling TLS related relocations and symbols when linking
5 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t
6 # RUN: ld.lld -static %t -o %t.exe
7 # RUN: llvm-objdump -s -t %t.exe | FileCheck %s
10 # CHECK: 00000000 g .tdata 00000000 tls1
11 # CHECK: [[TGA:[0-9a-f]+]] g .text 00000000 __tls_get_addr
13 # CHECK: Contents of section .data:
14 # CHECK-NEXT: {{.*}} [[TGA]] ffff8004 ffff9004
15 # CHECK: Contents of section .got:
16 # CHECK-NEXT: {{.*}} 00000000 80000000 ffff9000 00000001
17 # CHECK-NEXT: {{.*}} ffff8000 00000001 00000000
22 addiu $
2, $
3, %tlsgd
(tls1
) # R_MIPS_TLS_GD
23 addiu $
2, $
3, %tlsldm
(tls2
) # R_MIPS_TLS_LDM
24 addiu $
2, $
3, %gottprel
(tls1
) # R_MIPS_TLS_GOTTPREL
26 .global __tls_get_addr
33 .dtprelword tls1+4 # R_MIPS_TLS_DTPREL32
34 .tprelword tls1+4 # R_MIPS_TLS_TPREL32
36 .section .tdata,"awT",%progbits