44 lines · plain
1# REQUIRES: aarch642# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t.o3# RUN: llvm-mc -filetype=obj -triple=arm64-apple-darwin %s -o %t-dup.o4# 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.o5 6# CHECK: error: duplicate symbol: _foo7# CHECK-NEXT: >>> defined in duplicate-symbol-debug.s:208# CHECK-NEXT: >>> [[FILE_1]]9# CHECK-NEXT: >>> defined in duplicate-symbol-debug.s:2010# CHECK-NEXT: >>> [[FILE_2]]11 12## Test case adapted from lld/test/ELF/Inputs/vs-diagnostics-duplicate2.s13 14.file 1 "" "duplicate-symbol-debug.s"15 16.text17 18.globl _foo19.loc 1 2020_foo:21 nop22 23.section __DWARF,__debug_abbrev,regular,debug24 .byte 1 ; Abbreviation code25 .byte 17 ; DW_TAG_compile_unit26 .byte 0 ; DW_CHILDREN_no27 .byte 16 ; DW_AT_stmt_list28 .byte 23 ; DW_FORM_sec_offset29 .byte 0 ; EOM(1)30 .byte 0 ; EOM(2)31 .byte 0 ; EOM(3)32 33.section __DWARF,__debug_info,regular,debug34 .long Lend0 - Lbegin0 ; Length of Unit35Lbegin0:36 .short 4 ; DWARF version number37 .long __debug_abbrev ; Offset Into Abbrev. Section38 .byte 8 ; Address Size (in bytes)39 .byte 1 ; Abbrev [1] 0xb:0x1f DW_TAG_compile_unit40 .long __debug_line ; DW_AT_stmt_list41Lend0:42 .section __DWARF,__debug_line,regular,debug43 44