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: undef3.s(15): error: undefined symbol: foo 9// WARN: undef3.s(15): warning: undefined symbol: foo 10// CHECK: >>> referenced by undef3.s:15 11// CHECK-NEXT: >>> {{.*}}1.o:(.text+0x{{.+}}) 12 13// ERR: /tmp{{/|\\}}undef3.s(20): error: undefined symbol: bar 14// WARN: /tmp{{/|\\}}undef3.s(20): warning: undefined symbol: bar 15// CHECK: >>> referenced by undef3.s:20 (/tmp{{/|\\}}undef3.s:20) 16// CHECK-NEXT: >>> {{.*}}1.o:(.text+0x{{.+}}) 17 18.file 1 "undef3.s" 19.file 2 "/tmp" "undef3.s" 20 21.global _start, foo, bar 22.text 23_start: 24.loc 1 15 25 jmp foo 26.loc 2 20 27 jmp bar 28 29.section .debug_abbrev,"",@progbits 30 .byte 1 # Abbreviation Code 31 .byte 17 # DW_TAG_compile_unit 32 .byte 0 # DW_CHILDREN_no 33 .byte 16 # DW_AT_stmt_list 34 .byte 23 # DW_FORM_sec_offset 35 .byte 0 # EOM(1) 36 .byte 0 # EOM(2) 37 .byte 0 # EOM(3) 38 39.section .debug_info,"",@progbits 40 .long .Lend0 - .Lbegin0 # Length of Unit 41.Lbegin0: 42 .short 4 # DWARF version number 43 .long .debug_abbrev # Offset Into Abbrev. Section 44 .byte 8 # Address Size (in bytes) 45 .byte 1 # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit 46 .long .debug_line # DW_AT_stmt_list 47.Lend0: 48 .section .debug_line,"",@progbits 49