2 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o
3 # RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t-dup.o
4 # RUN: not %lld -dylib -arch arm64 -o /dev/null %t.o %t-dup.o 2>&1 | FileCheck %s -DFILE_1=%t.o -DFILE_2=%t-dup.o
6 # CHECK: error: duplicate symbol: _foo
7 # CHECK-NEXT: >>> defined in duplicate-symbol-debug.s:20
8 # CHECK-NEXT: >>> [[FILE_1]]
9 # CHECK-NEXT: >>> defined in duplicate-symbol-debug.s:20
10 # CHECK-NEXT: >>> [[FILE_2]]
12 ## Test case adapted from lld/test/ELF/Inputs/vs-diagnostics-duplicate2.s
14 .file 1 "" "duplicate-symbol-debug.s"
23 .section __DWARF,__debug_abbrev,regular,debug
24 .byte 1 ; Abbreviation code
25 .byte 17 ; DW_TAG_compile_unit
26 .byte 0 ; DW_CHILDREN_no
27 .byte 16 ; DW_AT_stmt_list
28 .byte 23 ; DW_FORM_sec_offset
33 .section __DWARF,__debug_info,regular,debug
34 .long Lend0 - Lbegin0 ; Length of Unit
36 .short 4 ; DWARF version number
37 .long __debug_abbrev ; Offset Into Abbrev. Section
38 .byte 8 ; Address Size (in bytes)
39 .byte 1 ; Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
40 .long __debug_line ; DW_AT_stmt_list
42 .section __DWARF,__debug_line,regular,debug