1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
3// RUN: not ld.lld --vs-diagnostics %t1.o -o /dev/null 2>&1 \
4// RUN:   | FileCheck -check-prefix=ERR -check-prefix=CHECK %s
5// RUN: ld.lld --vs-diagnostics --warn-unresolved-symbols %t1.o -o %tout 2>&1 \
6// RUN:   | FileCheck -check-prefix=WARN -check-prefix=CHECK %s
7
8// ERR:        {{.*}}ld.lld{{.*}}: error: undefined symbol: foo
9// WARN:       {{.*}}ld.lld{{.*}}: warning: undefined symbol: foo
10// CHECK-NEXT: >>> referenced by undef2.s
11// CHECK-NEXT: >>>               {{.*}}1.o:(.text+0x{{.+}})
12
13.file "undef2.s"
14
15.global _start, foo
16.text
17_start:
18  jmp foo
19