[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / ppc64-undefined-weak.s
blob7b1be5e36dd3278ab24ca45d727bd1675e212cb2
1 # REQUIRES: ppc
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>
21 # PDE-NEXT: nop
22 # PDE-NEXT: bl {{.*}} <_start+0x8>
23 # PDE-NEXT: nop
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: nop
31 .text
32 .global _start
33 _start:
34 bl undefweak1
35 nop
36 bl undefweak2
37 nop
39 .weak undefweak1, undefweak2
40 .hidden undefweak2