summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/bad-archive.s
blob: 6d70e554267849b70e199cf34f1be11ab4cddc17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// REQUIRES: x86

// Check bad archive error reporting with --whole-archive
// and without it.

// RUN: echo "!<arch>" > %t.a
// RUN: echo "foo" >> %t.a
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
// RUN: not ld.lld %t.o %t.a -o %t 2>&1 | FileCheck -DFILE=%t.a %s
// RUN: not ld.lld %t.o --whole-archive %t.a -o %t 2>&1 | FileCheck -DFILE=%t.a %s
// 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)

.globl _start
_start:
OpenPOWER on IntegriCloud