1# REQUIRES: x86, zlib 2# RUN: llvm-mc -filetype=obj -triple i686-linux-gnu -compress-debug-sections=zlib %s -o %t.o 3# RUN: llvm-readobj --sections %t.o | FileCheck -check-prefix=OBJ %s 4# RUN: not ld.lld %t.o %t.o -o /dev/null 2>&1 | FileCheck -check-prefix=ERROR %s 5 6# OBJ: Sections [ 7# OBJ: Section { 8# OBJ: Index: 9# OBJ: Name: .debug_line 10# OBJ-NEXT: Type: SHT_PROGBITS 11# OBJ-NEXT: Flags [ 12# OBJ-NEXT: SHF_COMPRESSED 13# OBJ-NEXT: ] 14 15# ERROR: error: duplicate symbol: main 16# ERROR-NEXT: >>> defined at reduced.c:2 ({{[/\\]}}tmp{{[/\\]}}reduced.c:2) 17# ERROR-NEXT: >>> 18# ERROR-NEXT: >>> defined at reduced.c:2 ({{[/\\]}}tmp{{[/\\]}}reduced.c:2) 19# ERROR-NEXT: >>> 20 21 .text 22 .file "reduced.c" 23 .globl main 24main: 25 .file 1 "/tmp" "reduced.c" 26 .loc 1 2 0 27 xorl %eax, %eax 28 retl 29 .file 2 "/tmp/repeat/repeat/repeat/repeat" "repeat.h" 30 31 .section .debug_abbrev,"",@progbits 32 .byte 1 # Abbreviation Code 33 .byte 17 # DW_TAG_compile_unit 34 .byte 0 # DW_CHILDREN_no 35 .byte 16 # DW_AT_stmt_list 36 .byte 23 # DW_FORM_sec_offset 37 .byte 0 # EOM(1) 38 .byte 0 # EOM(2) 39 .byte 0 # EOM(3) 40 41 .section .debug_info,"",@progbits 42 .long .Lend0 - .Lbegin0 # Length of Unit 43.Lbegin0: 44 .short 4 # DWARF version number 45 .long .debug_abbrev # Offset Into Abbrev. Section 46 .byte 4 # Address Size (in bytes) 47 .byte 1 # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit 48 .long .debug_line # DW_AT_stmt_list 49.Lend0: 50 .section .debug_line,"",@progbits 51