Changeset View
Changeset View
Standalone View
Standalone View
lld/test/ELF/mips-tls-hilo.s
# REQUIRES: mips | # REQUIRES: mips | ||||
# Check MIPS R_MIPS_TLS_DTPREL_HI16/LO16 and R_MIPS_TLS_TPREL_HI16/LO16 | # Check MIPS R_MIPS_TLS_DTPREL_HI16/LO16 and R_MIPS_TLS_TPREL_HI16/LO16 | ||||
# relocations handling. | # relocations handling. | ||||
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o | # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o | ||||
# RUN: ld.lld %t.o -o %t.exe | # RUN: ld.lld %t.o -o %t.exe | ||||
# RUN: llvm-objdump -d -t --no-show-raw-insn %t.exe | FileCheck --check-prefix=DIS %s | # RUN: llvm-objdump -d -t --no-show-raw-insn %t.exe | FileCheck --check-prefix=DIS %s | ||||
# RUN: llvm-readobj -r -A %t.exe | FileCheck %s | # RUN: llvm-readobj -r -A %t.exe | FileCheck %s | ||||
# RUN: ld.lld %t.o -shared -o %t.so | # RUN: not ld.lld %t.o -shared -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR --implicit-check-not=error: | ||||
# RUN: llvm-readobj -r -A %t.so | FileCheck -check-prefix=SO %s | |||||
# ERR: error: relocation R_MIPS_TLS_TPREL_HI16 against loc0 cannot be used with -shared | |||||
# ERR: error: relocation R_MIPS_TLS_TPREL_LO16 against loc0 cannot be used with -shared | |||||
# DIS: 00000000 l O .tdata 00000000 loc0 | # DIS: 00000000 l O .tdata 00000000 loc0 | ||||
# DIS: <__start>: | # DIS: <__start>: | ||||
# DIS-NEXT: addiu $2, $3, 0 | # DIS-NEXT: addiu $2, $3, 0 | ||||
# ^-- %hi(loc0 - .tdata - 0x8000) | # ^-- %hi(loc0 - .tdata - 0x8000) | ||||
# DIS-NEXT: addiu $2, $3, -32768 | # DIS-NEXT: addiu $2, $3, -32768 | ||||
# ^-- %lo(loc0 - .tdata - 0x8000) | # ^-- %lo(loc0 - .tdata - 0x8000) | ||||
Show All 31 Lines |