brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 5a4d37e Raw
37 lines · plain
1# REQUIRES: x86, zlib2 3# RUN: yaml2obj %s -o %t.o4 5## LLD uses zlib compression of level 1 by default. Unlike previous versions,6## -O does not change the level.7# RUN: ld.lld %t.o -o %t.default --compress-debug-sections=zlib8# RUN: llvm-readelf --sections %t.default | FileCheck -check-prefixes=HEADER,LEVEL1 %s9 10# RUN: ld.lld -O0 %t.o -o %t.O0 --compress-debug-sections=zlib11# RUN: cmp %t.default %t.O012 13# RUN: ld.lld -O2 %t.o -o %t.O2 --compress-debug-sections=zlib14# RUN: cmp %t.default %t.O215 16## --compression-level specifies the level.17# RUN: ld.lld %t.o -o %t.6 --compress-sections=.debug_info=zlib:618# RUN: llvm-readelf --sections %t.6 | FileCheck -check-prefixes=HEADER,LEVEL6 %s19 20# HEADER: [Nr] Name        Type     Address  Off    Size21# LEVEL1: [ 1] .debug_info PROGBITS 00000000 000094 0000{{1[def]|21}}22# LEVEL6: [ 1] .debug_info PROGBITS 00000000 000094 00001{{[abc]}}23 24## A little arbitrary debug section which has a different size after25## applying compression of level 1 and 6.26 27--- !ELF28FileHeader:29  Class:   ELFCLASS3230  Data:    ELFDATA2LSB31  Type:    ET_REL32  Machine: EM_38633Sections:34  - Name:    .debug_info35    Type:    SHT_PROGBITS36    Content: '010101010101010201010201010101010101010201010201010101010101010201010201'37