3 ## Ensure R_PPC_PLTREL retains .got even in the absence of
4 ## .got/_GLOBAL_OFFSET_TABLE_ references.
6 # RUN: llvm-mc -filetype=obj -triple=powerpc %s -o %t.o
7 # RUN: ld.lld -shared %t.o -o %t.so
8 # RUN: llvm-readobj -Sdr %t.so | FileCheck %s
10 .section .got2,"aw",@progbits
15 addis 30,30,.LTOC-.L0@ha
16 addi 30,30,.LTOC-.L0@l
19 ## DT_PPC_GOT must point to .got, which must have the 12-byte header.
20 ## The only relocation is an R_PPC_JMP_SLOT.
25 # CHECK-SAME: {{ }}[[#%x,GOT:]]
27 # CHECK-SAME: {{ 12$}}
28 # CHECK: DynamicSection [
29 # CHECK-NEXT: Tag Type Name/Value
30 # CHECK: 0x70000000 PPC_GOT [[#GOT]]
31 # CHECK: Relocations [
32 # CHECK-NEXT: Section ([[#]]) .rela.plt {
33 # CHECK-NEXT: 0x[[#%x,]] R_PPC_JMP_SLOT baz 0x0