1// REQUIRES: x86 2// RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o 3// RUN: not ld.lld --vs-diagnostics -shared %t.o -o /dev/null 2>&1 \ 4// RUN: | FileCheck %s 5 6// CHECK: undef.s(15): error: undefined hidden symbol: foo 7// CHECK-NEXT: >>> referenced by undef.s:15 8 9// CHECK: undef.s(27): error: undefined protected symbol: bar 10// CHECK-NEXT: >>> referenced by undef.s:27 11 12// CHECK: /tmp{{/|\\}}undef.s(13): error: undefined protected symbol: baz 13// CHECK-NEXT: >>> referenced by undef.s:13 (/tmp{{/|\\}}undef.s:13) 14 15.file 1 "undef.s" 16.file 2 "/tmp" "undef.s" 17 18.hidden foo 19.protected bar, baz 20.text 21_start: 22.loc 1 15 23 jmp foo 24.loc 1 27 25 jmp bar 26.loc 2 13 27 jmp baz 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