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
8 # 0x2a - 0x8000 = -32726
10 # CHECK-NEXT: addi 4, 4, -32726
11 # CHECK-NEXT: lis 5, 0
12 # CHECK-NEXT: ori 5, 5, 0
14 # NM: 000000000000002a B i
15 # RODATA: 2a000000 00000000
17 # We used to error on R_PPC64_DTPREL* to preemptable symbols.
18 # i is STB_GLOBAL and preemptable.
21 addis 4, 3, i@dtprel@ha
# R_PPC64_DTPREL16_HA
22 addi 4, 4, i@dtprel@
l # R_PPC64_DTPREL16_LO
24 lis 5, i@dtprel@highesta
# R_PPC64_DTPREL16_HIGHESTA
25 ori 5, 5, i@dtprel@highera
# R_PPC64_DTPREL16_HIGHERA
27 .section .rodata,"a",@progbits
30 .section .tbss,"awT",@nobits