Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / compressed-debug-conflict.s
blob1601a9d8e314652879a6582a261028a9f20abacd
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
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: ]
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: >>>
21 .text
22 .file "reduced.c"
23 .globl main
24 main:
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"
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)
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