1# REQUIRES: ppc 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 6 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. 9 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]] 14# CHECK-EMPTY: 15# CHECK-NEXT: <foo>: 16 17.globl _start 18_start: 19 b foo # R_PPC_REL24 20 b foo@plt # R_PPC_PLTREL24 21 b foo+32768@plt #_PPC_PLTREL24 with addend 22