2 # RUN: llvm-mc -filetype=obj -triple=powerpc %s -o %t.o
3 # RUN: echo '.globl foo; foo: blr' | llvm-mc -filetype=obj -triple=powerpc - -o %t1.o
4 # RUN: ld.lld %t.o %t1.o -o %t
5 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
7 ## R_PPC_REL24 and R_PPC_PLTREL24 are converted to PC relative relocations if the
8 ## symbol is non-preemptable. The addend of R_PPC_PLTREL24 should be ignored.
10 # CHECK: [[#%x,ADDR:]] <_start>:
11 # CHECK-NEXT: b 0x[[#%x,ADDR+12]]
12 # CHECK-NEXT: b 0x[[#%x,ADDR+12]]
13 # CHECK-NEXT: b 0x[[#%x,ADDR+12]]
20 b foo@plt
# R_PPC_PLTREL24
21 b foo+
32768@plt
#_PPC_PLTREL24 with addend