Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / ppc32-gnu-ifunc.s
blob66efd5ed242fce75f609e37e5314a868597ca6f0
1 # REQUIRES: ppc
2 # RUN: llvm-mc -filetype=obj -triple=powerpc %s -o %t.o
3 # RUN: ld.lld %t.o -o %t
4 # RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
5 # RUN: llvm-readelf -S -s %t | FileCheck --check-prefixes=SEC,SYM %s
6 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
8 # RUN: llvm-mc -filetype=obj -triple=powerpcle %s -o %t.o
9 # RUN: ld.lld %t.o -o %t
10 # RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
11 # RUN: llvm-readelf -S -s %t | FileCheck --check-prefixes=SEC,SYM %s
12 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
14 # RELOC: .rela.dyn {
15 # RELOC-NEXT: 0x10020118 R_PPC_IRELATIVE - 0x100100E0
16 # RELOC-NEXT: }
18 # SEC: .rela.dyn RELA 100000d4 0000d4 00000c
19 # SYM: 100100e0 0 FUNC GLOBAL DEFAULT {{.*}} func
21 # CHECK-LABEL: <func_resolver>:
22 # CHECK-NEXT: 100100e0:
23 # CHECK-LABEL: <_start>:
24 # CHECK-NEXT: bl 0x100100f8
25 ## .rela.plt = 0x100000d4 = 65536*4096+212
26 ## end(.rela.plt) = 0x100000d4+0xc = 65536*4096+224
27 # CHECK-NEXT: lis 9, 4096
28 # CHECK-NEXT: lis 8, 4096
29 # CHECK-NEXT: addi 9, 9, 212
30 # CHECK-NEXT: addi 8, 8, 224
32 .globl func
33 .type func, @gnu_indirect_function
34 func:
35 .globl func_resolver
36 .type func_resolver, @function
37 func_resolver:
38 blr
40 .globl _start
41 _start:
42 bl func
44 lis 9, __rela_iplt_start@ha
45 lis 8, __rela_iplt_end@ha
46 la 9, __rela_iplt_start@l(9)
47 la 8, __rela_iplt_end@l(8)