41 lines · plain
1# REQUIRES: ppc2 3# RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o4# RUN: ld.lld %t.o -o %t5# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s --check-prefix=STATIC6# RUN: ld.lld -pie %t.o -o %t7# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s --check-prefix=STATIC8# RUN: ld.lld -shared %t.o -o %t.so9# RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s --check-prefix=PIC10 11# RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t.o12# RUN: ld.lld %t.o -o %t13# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s --check-prefix=STATIC14 15## Branches to an undefined weak symbol need a thunk iff a dynamic relocation is16## produced. undefweak2 is hidden and does not need a dynamic relocation, so we17## suppress the thunk. undefweak1 needs a thunk iff -pie or -shared.18 19# STATIC-LABEL: <_start>:20# STATIC-NEXT: bl {{.*}} <_start>21# STATIC-NEXT: nop22# STATIC-NEXT: bl {{.*}} <_start+0x8>23# STATIC-NEXT: nop24 25# PIC-LABEL: <_start>:26# PIC-NEXT: bl {{.*}} <__plt_undefweak1>27# PIC-NEXT: ld 2, 24(1)28# PIC-NEXT: bl {{.*}} <_start+0x8>29# PIC-NEXT: nop30 31.text32.global _start33_start:34 bl undefweak135 nop36 bl undefweak237 nop38 39.weak undefweak1, undefweak240.hidden undefweak241