[ELF] Add test for freebsd bfdname

Make sure the output error contains the full bfdname. Suggested by
George Rimar in https://reviews.llvm.org/D76109#inline-693972.
This commit is contained in:
Shoaib Meenai 2020-03-13 14:15:58 -07:00
parent 42b7827411
commit e890453d6d
1 changed files with 5 additions and 0 deletions

View File

@ -53,6 +53,11 @@
// RUN: FileCheck --check-prefix=A-AND-SCRIPT %s
// A-AND-SCRIPT: a.o is incompatible with elf32-i386
// RUN: echo 'OUTPUT_FORMAT(elf32-i386-freebsd)' > %t-freebsd.script
// RUN: not ld.lld %t-freebsd.script %ta.o -o /dev/null 2>&1 | \
// RUN: FileCheck --check-prefix=A-AND-FREEBSD-SCRIPT %s
// A-AND-FREEBSD-SCRIPT: a.o is incompatible with elf32-i386-freebsd
// We used to fail to identify this incompatibility and crash trying to
// read a 64 bit file as a 32 bit one.
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/archive2.s -o %ta.o