1# REQUIRES: aarch64 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 5 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]] 11 12## Test case adapted from lld/test/ELF/Inputs/vs-diagnostics-duplicate2.s 13 14.file 1 "" "duplicate-symbol-debug.s" 15 16.text 17 18.globl _foo 19.loc 1 20 20_foo: 21 nop 22 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 29 .byte 0 ; EOM(1) 30 .byte 0 ; EOM(2) 31 .byte 0 ; EOM(3) 32 33.section __DWARF,__debug_info,regular,debug 34 .long Lend0 - Lbegin0 ; Length of Unit 35Lbegin0: 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 41Lend0: 42 .section __DWARF,__debug_line,regular,debug 43 44