1# REQUIRES: ppc 2# RUN: llvm-mc -filetype=obj -triple=ppc64le %s -o %t.o 3# RUN: ld.lld %t.o -shared -o %t.so 4# RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s 5# RUN: llvm-nm %t.so | FileCheck --check-prefix=NM %s 6# RUN: llvm-readelf -x .rodata %t.so | FileCheck --check-prefix=RODATA %s 7 8# 0x2a - 0x8000 = -32726 9# CHECK: addis 4, 3, 0 10# CHECK-NEXT: addi 4, 4, -32726 11# CHECK-NEXT: lis 5, 0 12# CHECK-NEXT: ori 5, 5, 0 13 14# NM: 000000000000002a B i 15# RODATA: 2a000000 00000000 16 17# We used to error on R_PPC64_DTPREL* to preemptable symbols. 18# i is STB_GLOBAL and preemptable. 19.globl foo 20foo: 21 addis 4, 3, i@dtprel@ha # R_PPC64_DTPREL16_HA 22 addi 4, 4, i@dtprel@l # R_PPC64_DTPREL16_LO 23 24 lis 5, i@dtprel@highesta # R_PPC64_DTPREL16_HIGHESTA 25 ori 5, 5, i@dtprel@highera # R_PPC64_DTPREL16_HIGHERA 26 27.section .rodata,"a",@progbits 28 .quad i@dtprel+32768 29 30.section .tbss,"awT",@nobits 31 .space 0x2a 32.globl i 33i: 34 .long 0 35 .size i, 4 36