xref: /aosp_15_r20/external/llvm/test/MC/PowerPC/ppc-reloc.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc -triple=powerpc-unknown-linux-gnu -filetype=obj %s | \
2*9880d681SAndroid Build Coastguard Worker# RUN: llvm-readobj -r | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker	.section .text
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker	.globl foo
6*9880d681SAndroid Build Coastguard Worker	.type foo,@function
7*9880d681SAndroid Build Coastguard Worker	.align 2
8*9880d681SAndroid Build Coastguard Workerfoo:
9*9880d681SAndroid Build Coastguard Worker	bl printf@plt
10*9880d681SAndroid Build Coastguard Worker	bl _GLOBAL_OFFSET_TABLE_@local-4
11*9880d681SAndroid Build Coastguard Worker.LC1:
12*9880d681SAndroid Build Coastguard Worker	.size foo, . - foo
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker# CHECK:      Relocations [
15*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT:   Section {{.*}} .rela.text {
16*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT:     0x0 R_PPC_PLTREL24 printf 0x0
17*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT:     0x4 R_PPC_LOCAL24PC _GLOBAL_OFFSET_TABLE_ 0xFFFFFFFC
18*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT:   }
19*9880d681SAndroid Build Coastguard Worker# CHECK-NEXT: ]
20