1 # Check PIC/CPIC flags merging in case of multiple input objects.
3 # RUN: yaml2obj -format=elf -docnum 1 %s > %t-none.o
4 # RUN: yaml2obj -format=elf -docnum 2 %s > %t-cpic.o
5 # RUN: yaml2obj -format=elf -docnum 3 %s > %t-pic.o
6 # RUN: yaml2obj -format=elf -docnum 4 %s > %t-both.o
8 # RUN: lld -flavor gnu -target mips64el -e T1 -o %t-abi1.exe \
9 # RUN: %t-none.o %t-pic.o 2>&1 | FileCheck -check-prefix=ABI-CALLS-WARN %s
10 # RUN: llvm-readobj -file-headers %t-abi1.exe \
11 # RUN: | FileCheck -check-prefix=ABI-CALLS1 %s
13 # RUN: lld -flavor gnu -target mips64el -e T1 -o %t-abi2.exe \
14 # RUN: %t-cpic.o %t-none.o 2>&1 | FileCheck -check-prefix=ABI-CALLS-WARN %s
15 # RUN: llvm-readobj -file-headers %t-abi2.exe \
16 # RUN: | FileCheck -check-prefix=ABI-CALLS2 %s
18 # RUN: lld -flavor gnu -target mips64el -e T2 -o %t-cpic.exe %t-cpic.o %t-pic.o
19 # RUN: llvm-readobj -file-headers %t-cpic.exe | FileCheck -check-prefix=CPIC %s
21 # RUN: lld -flavor gnu -target mips64el -e T3 -o %t-both.exe %t-pic.o %t-both.o
22 # RUN: llvm-readobj -file-headers %t-both.exe | FileCheck -check-prefix=BOTH %s
24 # ABI-CALLS-WARN: lld warning: linking abicalls and non-abicalls files
26 # ABI-CALLS1: Flags [ (0x60000004)
27 # ABI-CALLS1-NEXT: EF_MIPS_ARCH_64 (0x60000000)
28 # ABI-CALLS1-NEXT: EF_MIPS_CPIC (0x4)
31 # ABI-CALLS2: Flags [ (0x60000004)
32 # ABI-CALLS2-NEXT: EF_MIPS_ARCH_64 (0x60000000)
33 # ABI-CALLS2-NEXT: EF_MIPS_CPIC (0x4)
36 # CPIC: Flags [ (0x60000004)
37 # CPIC-NEXT: EF_MIPS_ARCH_64 (0x60000000)
38 # CPIC-NEXT: EF_MIPS_CPIC (0x4)
41 # BOTH: Flags [ (0x60000006)
42 # BOTH-NEXT: EF_MIPS_ARCH_64 (0x60000000)
43 # BOTH-NEXT: EF_MIPS_CPIC (0x4)
44 # BOTH-NEXT: EF_MIPS_PIC (0x2)
54 Flags: [EF_MIPS_ARCH_64]
59 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
75 Flags: [EF_MIPS_ARCH_64, EF_MIPS_CPIC]
80 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
96 Flags: [EF_MIPS_ARCH_64, EF_MIPS_PIC]
101 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
117 Flags: [EF_MIPS_ARCH_64, EF_MIPS_CPIC, EF_MIPS_PIC]
122 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]