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 -DFILE=%t1.o %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 -DFILE=%t1.o %s
7
8// ERR:        [[FILE]]: error: undefined symbol: foo
9// WARN:       [[FILE]]: warning: undefined symbol: foo
10// CHECK-NEXT: >>> referenced by {{.*}}1.o:(.text+0x{{.+}})
11
12.global _start, foo
13.text
14_start:
15  jmp foo