summaryrefslogtreecommitdiff
path: root/test/old-elf/Mips/e-flags-merge-1.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/old-elf/Mips/e-flags-merge-1.test')
-rw-r--r--test/old-elf/Mips/e-flags-merge-1.test56
1 files changed, 56 insertions, 0 deletions
diff --git a/test/old-elf/Mips/e-flags-merge-1.test b/test/old-elf/Mips/e-flags-merge-1.test
new file mode 100644
index 0000000000000..bc100534112df
--- /dev/null
+++ b/test/old-elf/Mips/e-flags-merge-1.test
@@ -0,0 +1,56 @@
+# Check that the linker shows an error when object file has missed
+# or unsupported ABI and ARCH flags or unsupported ASE flags.
+
+# RUN: yaml2obj -format=elf -docnum 1 %s > %t-no-abi.o
+# RUN: not lld -flavor old-gnu -target mipsel -e T -o %t.exe %t-no-abi.o 2>&1 | \
+# RUN: FileCheck -check-prefix=INVALID-ABI %s
+
+# RUN: yaml2obj -format=elf -docnum 2 %s > %t-mips16.o
+# RUN: not lld -flavor old-gnu -target mipsel -e T -o %t.exe %t-mips16.o 2>&1 | \
+# RUN: FileCheck -check-prefix=MIPS16 %s
+
+# INVALID-ABI: Unsupported ABI
+# MIPS16: Unsupported extension: MIPS16
+
+# no-abi.o
+---
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_MIPS
+ Flags: []
+
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x04
+ Size: 0x04
+
+Symbols:
+ Global:
+ - Name: T
+ Section: .text
+
+# mips16.o
+---
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_MIPS
+ Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32, EF_MIPS_ARCH_ASE_M16]
+
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x04
+ Size: 0x04
+
+Symbols:
+ Global:
+ - Name: T
+ Section: .text
+...