xref: /llvm-project/lld/test/ELF/incompatible-ar-first.s (revision 3d85424096ff1e20ca735cbe455870cea7ed098f)
1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/archive.s -o %ta.o
3// RUN: rm -f %t.a
4// RUN: llvm-ar rc %t.a %ta.o
5// RUN: llvm-mc -filetype=obj -triple=i686-linux %s -o %tb.o
6// RUN: not ld.lld %t.a %tb.o -o /dev/null 2>&1 | FileCheck %s
7
8// We used to crash when
9// * The first object seen by the symbol table is from an archive.
10// * -m was not used.
11
12// RUN: not ld.lld --start-lib %ta.o --end-lib %tb.o -o /dev/null 2>&1 | FileCheck %s
13
14// CHECK: {{.*}}b.o is incompatible{{$}}
15