[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / mips-merge-abiflags.s
blob15fe44276f9ca3abf43d2147609be71c4d023e36
1 # REQUIRES: mips
2 # Test that lld handles input files with concatenated .MIPS.abiflags sections
3 # This happens e.g. with the FreeBSD BFD (BFD 2.17.50 [FreeBSD] 2007-07-03)
5 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-freebsd %s -o %t.o
6 # RUN: ld.lld %t.o %p/Inputs/mips-concatenated-abiflags.o -o %t.exe
7 # RUN: llvm-readobj --sections -A %t.exe | FileCheck %s
8 # RUN: llvm-readobj --sections -A %p/Inputs/mips-concatenated-abiflags.o 2>&1 \
9 # RUN: | FileCheck --check-prefix=INPUT-OBJECT %s
11 .globl __start
12 __start:
13 nop
15 # CHECK: Section {
16 # CHECK: Index: 1
17 # CHECK-NEXT: Name: .MIPS.abiflags
18 # CHECK-NEXT: Type: SHT_MIPS_ABIFLAGS
19 # CHECK-NEXT: Flags [
20 # CHECK-NEXT: SHF_ALLOC
21 # CHECK-NEXT: ]
22 # CHECK-NEXT: Address:
23 # CHECK-NEXT: Offset:
24 # CHECK-NEXT: Size: 24
25 # CHECK-NEXT: Link: 0
26 # CHECK-NEXT: Info: 0
27 # CHECK-NEXT: AddressAlignment: 8
28 # CHECK-NEXT: EntrySize: 24
29 # CHECK-NEXT: }
31 # CHECK: MIPS ABI Flags {
32 # CHECK-NEXT: Version: 0
33 # CHECK-NEXT: ISA: MIPS64
34 # CHECK-NEXT: ISA Extension: None
35 # CHECK-NEXT: ASEs [
36 # CHECK-NEXT: ]
37 # CHECK-NEXT: FP ABI: Hard float (double precision)
38 # CHECK-NEXT: GPR size: 64
39 # CHECK-NEXT: CPR1 size: 64
40 # CHECK-NEXT: CPR2 size: 0
41 # CHECK-NEXT: Flags 1 [
42 # CHECK-NEXT: ODDSPREG
43 # CHECK-NEXT: ]
44 # CHECK-NEXT: Flags 2: 0x0
45 # CHECK-NEXT: }
47 # INPUT-OBJECT: Section {
48 # INPUT-OBJECT: Index: 3
49 # INPUT-OBJECT-NEXT: Name: .MIPS.abiflags
50 # INPUT-OBJECT-NEXT: Type: SHT_MIPS_ABIFLAGS
51 # INPUT-OBJECT-NEXT: Flags [
52 # INPUT-OBJECT-NEXT: SHF_ALLOC
53 # INPUT-OBJECT-NEXT: ]
54 # INPUT-OBJECT-NEXT: Address:
55 # INPUT-OBJECT-NEXT: Offset:
56 # INPUT-OBJECT-NEXT: Size: 48
57 # INPUT-OBJECT-NEXT: Link: 0
58 # INPUT-OBJECT-NEXT: Info: 0
59 # INPUT-OBJECT-NEXT: AddressAlignment: 8
60 # INPUT-OBJECT-NEXT: EntrySize: 0
61 # INPUT-OBJECT-NEXT: }
62 # INPUT-OBJECT: unable to read the .MIPS.abiflags section: it has a wrong size (48)