Index: test/ELF/invalid/data-encoding.test =================================================================== --- /dev/null +++ test/ELF/invalid/data-encoding.test @@ -0,0 +1,18 @@ +# The object in the archive has invalid data encoding. +# Check we report this. + +# RUN: echo ".long foo" > %t.s +# RUN: llvm-mc %t.s -o %t -filetype=obj -triple x86_64-pc-linux + +# RUN: yaml2obj %s -o %t.o +# RUN: llvm-ar rcs %t.a %t.o + +# RUN: not ld.lld %t %t.a -o %t2 2>&1 | FileCheck %s +# CHECK: {{.*}}.o: invalid data encoding + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATANONE + Type: ET_REL + Machine: EM_X86_64 Index: test/ELF/invalid/invalid-elf.test =================================================================== --- test/ELF/invalid/invalid-elf.test +++ test/ELF/invalid/invalid-elf.test @@ -1,10 +1,6 @@ # REQUIRES: x86 # RUN: llvm-mc %s -o %t -filetype=obj -triple x86_64-pc-linux -# RUN: not ld.lld %t %p/Inputs/data-encoding.a -o %t2 2>&1 | \ -# RUN: FileCheck --check-prefix=INVALID-DATA-ENC %s -# INVALID-DATA-ENC: test.o: invalid data encoding - # RUN: not ld.lld %t %p/Inputs/file-class.a -o %t2 2>&1 | \ # RUN: FileCheck --check-prefix=INVALID-FILE-CLASS %s # INVALID-FILE-CLASS: test.o: invalid file class