17 lines · plain
1// REQUIRES: x862// This test intentionally checks for fatal errors, and fatal errors aren't supported for testing when main is run twice.3// XFAIL: main-run-twice4 5// Check bad archive error reporting with --whole-archive6// and without it.7 8// RUN: echo "!<arch>" > %t.a9// RUN: echo "foo" >> %t.a10// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o11// RUN: not ld.lld %t.o %t.a -o /dev/null 2>&1 | FileCheck -DFILE=%t.a %s12// RUN: not ld.lld %t.o --whole-archive %t.a -o /dev/null 2>&1 | FileCheck -DFILE=%t.a %s13// CHECK: error: [[FILE]]: failed to parse archive: truncated or malformed archive (remaining size of archive too small for next archive member header at offset 8)14 15.globl _start16_start:17