2 # RUN: llvm-mc -filetype=obj -triple=powerpc %s -o %t.o
3 # RUN: ld.lld -pie %t.o -o %t
4 # RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s
5 # RUN: llvm-readelf -s %t | FileCheck --check-prefix=SYM %s
6 # RUN: llvm-readelf -x .got2 %t | FileCheck --check-prefix=HEX %s
7 # RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
9 # RUN: ld.lld -pie %t.o -o %t --apply-dynamic-relocs
10 # RUN: llvm-readelf -x .got2 %t | FileCheck --check-prefix=HEX2 %s
13 # RELOC-NEXT: 0x3022C R_PPC_RELATIVE - 0x101A0
14 # RELOC-NEXT: 0x30230 R_PPC_IRELATIVE - 0x10188
17 # SYM: 000101a0 0 FUNC GLOBAL DEFAULT {{.*}} func
18 # HEX: Hex dump of section '.got2':
19 # HEX-NEXT: 0x0003022c 00000000 ....
21 # HEX2: Hex dump of section '.got2':
22 # HEX2-NEXT: 0x0003022c 000101a0 ....
27 # CHECK: Disassembly of section .text:
29 # CHECK-NEXT: 10188: blr
31 # CHECK-NEXT: bl 0x10190
33 # CHECK-NEXT: <00008000.got2.plt_pic32.func>:
34 ## 0x10020114 = 65536*4098+276
35 # CHECK-NEXT: lwz 11, -32764(30)
36 # CHECK-NEXT: mtctr 11
42 .type func, @gnu_indirect_function