2018-02-16 11:26:53 +08:00
|
|
|
// REQUIRES: x86
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
|
|
|
// RUN: mkdir -p %t.dir
|
|
|
|
// RUN: rm -f %t.dir/liba.a
|
|
|
|
// RUN: llvm-ar rcs %t.dir/liba.a %t.o
|
2018-07-03 01:48:23 +08:00
|
|
|
// RUN: ld.lld -L%t.dir --whole-archive -la -o /dev/null -Map=- | FileCheck %s
|
2018-02-16 11:26:53 +08:00
|
|
|
|
|
|
|
.globl _start
|
|
|
|
_start:
|
|
|
|
nop
|
|
|
|
|
|
|
|
// There was a use after free of an archive name.
|
|
|
|
// Valgrind/asan would detect it.
|
|
|
|
// CHECK: liba.a(whole-archive-name.s.tmp.o):(.text)
|
|
|
|
// CHECK-NEXT: _start
|