55 lines · plain
1# REQUIRES: zlib2# RUN: yaml2obj --docnum=1 %s -o %t1.o3# RUN: not ld.lld %t1.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=TOO-SHORT4# TOO-SHORT: error: {{.*}}.o:(.debug_info): corrupted compressed section5 6# RUN: yaml2obj --docnum=2 %s -o %t2.o7# RUN: not ld.lld %t2.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=UNKNOWN8# UNKNOWN: error: {{.*}}.o:(.debug_info): unsupported compression type (3)9 10# RUN: yaml2obj --docnum=3 %s -o %t3.o11# RUN: not ld.lld %t3.o -o /dev/null -shared 2>&1 | FileCheck %s12# RUN: ld.lld %t3.o -o /dev/null -shared --noinhibit-exec13 14## Check we are able to report zlib decompress errors.15# CHECK: error: {{.*}}.o:(.debug_info): decompress failed: zlib error: Z_DATA_ERROR16 17--- !ELF18FileHeader:19 Class: ELFCLASS6420 Data: ELFDATA2LSB21 Type: ET_REL22 Machine: EM_X86_6423Sections:24 - Type: SHT_PROGBITS25 Name: .debug_info26 Flags: [ SHF_COMPRESSED ]27 AddressAlign: 828 Content: "0100000000000000040000000000000001000000000000"29 30--- !ELF31FileHeader:32 Class: ELFCLASS6433 Data: ELFDATA2LSB34 Type: ET_REL35 Machine: EM_X86_6436Sections:37 - Type: SHT_PROGBITS38 Name: .debug_info39 Flags: [ SHF_COMPRESSED ]40 AddressAlign: 841 Content: "030000000000000000000000000000000100000000000000789c030000000001"42 43--- !ELF44FileHeader:45 Class: ELFCLASS6446 Data: ELFDATA2LSB47 Type: ET_REL48 Machine: EM_X86_6449Sections:50 - Type: SHT_PROGBITS51 Name: .debug_info52 Flags: [ SHF_COMPRESSED ]53 AddressAlign: 854 Content: "010000000000000004000000000000000100000000000000ffff"55