[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / ppc32-reloc-pltrel.s
blob17418482871c442f8ab41f8ad5a3a57c9d515d50
1 # REQUIRES: ppc
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
11 .set .LTOC, .+0x8000
13 .text
14 .L0:
15 addis 30,30,.LTOC-.L0@ha
16 addi 30,30,.LTOC-.L0@l
17 bl baz+0x8000@plt
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.
22 # CHECK: Sections [
23 # CHECK: Name: .got (
24 # CHECK: Address:
25 # CHECK-SAME: {{ }}[[#%x,GOT:]]
26 # CHECK: Size:
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
34 # CHECK-NEXT: }
35 # CHECK-NEXT: ]