summaryrefslogtreecommitdiff
path: root/test/old-elf/Mips/e-flags-merge-5-64.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/old-elf/Mips/e-flags-merge-5-64.test')
-rw-r--r--test/old-elf/Mips/e-flags-merge-5-64.test42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/old-elf/Mips/e-flags-merge-5-64.test b/test/old-elf/Mips/e-flags-merge-5-64.test
new file mode 100644
index 0000000000000..f1fdac2c8c059
--- /dev/null
+++ b/test/old-elf/Mips/e-flags-merge-5-64.test
@@ -0,0 +1,42 @@
+# Check that LLD does not allow to mix 32 and 64-bit MIPS object files.
+
+# RUN: yaml2obj -format=elf -docnum 1 %s > %t-32.o
+# RUN: yaml2obj -format=elf -docnum 2 %s > %t-64.o
+
+# RUN: not lld -flavor old-gnu -target mips64el -shared -o %t.so \
+# RUN: %t-32.o %t-64.o 2>&1 | FileCheck %s
+
+# CHECK: ELF64 expected, but got ELF32
+
+# 32.o
+---
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_MIPS
+ Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32]
+
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x04
+ Size: 0x04
+
+# 64.o
+---
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_MIPS
+ Flags: [EF_MIPS_ARCH_64]
+
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x10
+ Size: 0x08
+...