51 lines · plain
1# REQUIRES: x86, zlib2# RUN: llvm-mc -filetype=obj -triple i686-linux-gnu -compress-debug-sections=zlib %s -o %t.o3# RUN: llvm-readobj --sections %t.o | FileCheck -check-prefix=OBJ %s4# RUN: not ld.lld %t.o %t.o -o /dev/null 2>&1 | FileCheck -check-prefix=ERROR %s5 6# OBJ: Sections [7# OBJ: Section {8# OBJ: Index:9# OBJ: Name: .debug_line10# OBJ-NEXT: Type: SHT_PROGBITS11# OBJ-NEXT: Flags [12# OBJ-NEXT: SHF_COMPRESSED13# OBJ-NEXT: ]14 15# ERROR: error: duplicate symbol: main16# 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 .text22 .file "reduced.c"23 .globl main24main:25 .file 1 "/tmp" "reduced.c"26 .loc 1 2 027 xorl %eax, %eax28 retl29 .file 2 "/tmp/repeat/repeat/repeat/repeat" "repeat.h"30 31 .section .debug_abbrev,"",@progbits32 .byte 1 # Abbreviation Code33 .byte 17 # DW_TAG_compile_unit34 .byte 0 # DW_CHILDREN_no35 .byte 16 # DW_AT_stmt_list36 .byte 23 # DW_FORM_sec_offset37 .byte 0 # EOM(1)38 .byte 0 # EOM(2)39 .byte 0 # EOM(3)40 41 .section .debug_info,"",@progbits42 .long .Lend0 - .Lbegin0 # Length of Unit43.Lbegin0:44 .short 4 # DWARF version number45 .long .debug_abbrev # Offset Into Abbrev. Section46 .byte 4 # Address Size (in bytes)47 .byte 1 # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit48 .long .debug_line # DW_AT_stmt_list49.Lend0:50 .section .debug_line,"",@progbits51