summaryrefslogtreecommitdiff
path: root/test/elf/Mips/e-flags-merge-10.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/elf/Mips/e-flags-merge-10.test')
-rw-r--r--test/elf/Mips/e-flags-merge-10.test43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/elf/Mips/e-flags-merge-10.test b/test/elf/Mips/e-flags-merge-10.test
new file mode 100644
index 0000000000000..a0aa45d5f2c89
--- /dev/null
+++ b/test/elf/Mips/e-flags-merge-10.test
@@ -0,0 +1,43 @@
+# Check that LLD shows an error and does not link files with mips32r2
+# and mips32r6 instructions sets.
+
+# RUN: yaml2obj -format=elf -docnum 1 %s > %t-32r2.o
+# RUN: yaml2obj -format=elf -docnum 2 %s > %t-32r6.o
+
+# RUN: not lld -flavor gnu -target mipsel -shared -o %t.so \
+# RUN: %t-32r2.o %t-32r6.o 2>&1 | FileCheck %s
+
+# CHECK: Linking modules with incompatible ISA
+
+# 32r2.o
+---
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_MIPS
+ Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R2]
+
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x04
+ Size: 0x04
+
+# 32r6.o
+---
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_MIPS
+ Flags: [EF_MIPS_ABI_O32, EF_MIPS_ARCH_32R6]
+
+Sections:
+ - Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x04
+ Size: 0x04
+...