]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/mips-tls-static-64.s
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / mips-tls-static-64.s
1 # REQUIRES: mips
2 # Check handling TLS related relocations and symbols when linking
3 # a 64-bit static executable.
4
5 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t
6 # RUN: ld.lld -static %t -o %t.exe
7 # RUN: llvm-objdump -s -t %t.exe | FileCheck %s
8
9 # CHECK:      Contents of section .data:
10 # CHECK-NEXT:  30000 00020004 ffffffff ffff8004 ffffffff
11 # CHECK-NEXT:  30010 ffff9004
12 #
13 # CHECK: SYMBOL TABLE:
14 # CHECK: 0000000000020004         .text           00000000 __tls_get_addr
15 # CHECK: 0000000000000000 g       .tdata          00000000 tls1
16
17   .text
18   .global __start
19 __start:
20   nop
21
22   .global __tls_get_addr
23 __tls_get_addr:
24   nop
25
26   .data
27 loc:
28   .word __tls_get_addr
29   .dtpreldword tls1+4   # R_MIPS_TLS_DTPREL64
30   .tpreldword tls1+4    # R_MIPS_TLS_TPREL64
31
32  .section .tdata,"awT",%progbits
33  .global tls1
34 tls1:
35  .word __tls_get_addr
36  .word 0