diff options
Diffstat (limited to 'test/ELF/vs-diagnostics-undefined-symbol-2.s')
-rw-r--r-- | test/ELF/vs-diagnostics-undefined-symbol-2.s | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ELF/vs-diagnostics-undefined-symbol-2.s b/test/ELF/vs-diagnostics-undefined-symbol-2.s new file mode 100644 index 000000000..3c8c80ef6 --- /dev/null +++ b/test/ELF/vs-diagnostics-undefined-symbol-2.s @@ -0,0 +1,18 @@ +// REQUIRES: x86 +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o +// RUN: not ld.lld --vs-diagnostics %t1.o -o %tout 2>&1 \ +// RUN: | FileCheck -check-prefix=ERR -check-prefix=CHECK %s +// RUN: ld.lld --vs-diagnostics --warn-unresolved-symbols %t1.o -o %tout 2>&1 \ +// RUN: | FileCheck -check-prefix=WARN -check-prefix=CHECK %s + +// ERR: {{.*}}ld.lld{{.*}}: error: undefined symbol: foo +// WARN: {{.*}}ld.lld{{.*}}: warning: undefined symbol: foo +// CHECK-NEXT: >>> referenced by undef2.s +// CHECK-NEXT: >>> {{.*}}1.o:(.text+0x{{.+}}) + +.file "undef2.s" + +.global _start, foo +.text +_start: + jmp foo |