3 # RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o
4 # RUN: ld.lld %t.o -o %t
5 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s --check-prefix=PDE
6 # RUN: ld.lld -pie %t.o -o %t
7 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s --check-prefix=PIC
8 # RUN: ld.lld -shared %t.o -o %t.so
9 # RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck %s --check-prefix=PIC
11 # RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t.o
12 # RUN: ld.lld %t.o -o %t
13 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s --check-prefix=PDE
15 ## Branches to an undefined weak symbol need a thunk iff a dynamic relocation is
16 ## produced. undefweak2 is hidden and does not need a dynamic relocation, so we
17 ## suppress the thunk. undefweak1 needs a thunk iff -pie or -shared.
19 # PDE-LABEL: <_start>:
20 # PDE-NEXT: bl {{.*}} <_start>
22 # PDE-NEXT: bl {{.*}} <_start+0x8>
25 # PIC-LABEL: <_start>:
26 # PIC-NEXT: bl {{.*}} <__plt_undefweak1>
27 # PIC-NEXT: ld 2, 24(1)
28 # PIC-NEXT: bl {{.*}} <_start+0x8>
39 .weak undefweak1, undefweak2