[JITLink][arm64] Support arm64e JIT'd code (initially enabled for MachO only).
[llvm-project.git] / lld / test / ELF / mips-tls-hilo.s
blob9c67f9fe14ba6fd986105d4741d5fccfa545d586
1 # REQUIRES: mips
2 # Check MIPS R_MIPS_TLS_DTPREL_HI16/LO16 and R_MIPS_TLS_TPREL_HI16/LO16
3 # relocations handling.
5 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
6 # RUN: ld.lld %t.o -o %t.exe
7 # RUN: llvm-objdump --no-print-imm-hex -d -t --no-show-raw-insn %t.exe | FileCheck --check-prefix=DIS %s
8 # RUN: llvm-readobj -r -A %t.exe | FileCheck %s
10 # RUN: not ld.lld %t.o -shared -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR --implicit-check-not=error:
12 # ERR: error: relocation R_MIPS_TLS_TPREL_HI16 against loc0 cannot be used with -shared
13 # ERR: error: relocation R_MIPS_TLS_TPREL_LO16 against loc0 cannot be used with -shared
15 # DIS: 00000000 l .tdata 00000000 loc0
17 # DIS: <__start>:
18 # DIS-NEXT: addiu $2, $3, 0
19 # ^-- %hi(loc0 - .tdata - 0x8000)
20 # DIS-NEXT: addiu $2, $3, -32768
21 # ^-- %lo(loc0 - .tdata - 0x8000)
22 # DIS-NEXT: addiu $2, $3, 0
23 # ^-- %hi(loc0 - .tdata - 0x7000)
24 # DIS-NEXT: addiu $2, $3, -28672
25 # ^-- %lo(loc0 - .tdata - 0x7000)
27 # CHECK: Relocations [
28 # CHECK-NEXT: ]
29 # CHECK-NOT: Primary GOT
31 .text
32 .globl __start
33 .type __start,@function
34 __start:
35 addiu $2, $3, %dtprel_hi(loc0) # R_MIPS_TLS_DTPREL_HI16
36 addiu $2, $3, %dtprel_lo(loc0) # R_MIPS_TLS_DTPREL_LO16
37 addiu $2, $3, %tprel_hi(loc0) # R_MIPS_TLS_TPREL_HI16
38 addiu $2, $3, %tprel_lo(loc0) # R_MIPS_TLS_TPREL_LO16
40 .section .tdata,"awT",%progbits
41 loc0:
42 .word 0