1# REQUIRES: zlib 2 3# RUN: yaml2obj %s -o %t1.o 4# RUN: llvm-objcopy --compress-debug-sections %t1.o %t2.o 5# RUN: llvm-readobj -S %t2.o | FileCheck %s 6 7# Non-.zdebug* sections whose data does start with "ZLIB" should 8# not be considered as zlib-gnu compressed sections. 9 10# In this test we have 2 normal sections, one of them starts with "ZLIB", 11# another starts with "ZZZZ". Check we compress both as expected. 12 13# CHECK: Name: .debug_foo 14# CHECK-NEXT: Type: SHT_PROGBITS 15# CHECK-NEXT: Flags [ 16# CHECK-NEXT: SHF_COMPRESSED 17# CHECK-NEXT: ] 18 19# CHECK: Name: .debug_bar 20# CHECK-NEXT: Type: SHT_PROGBITS 21# CHECK-NEXT: Flags [ 22# CHECK-NEXT: SHF_COMPRESSED 23# CHECK-NEXT: ] 24 25--- !ELF 26FileHeader: 27 Class: ELFCLASS64 28 Data: ELFDATA2LSB 29 Type: ET_REL 30 Machine: EM_X86_64 31Sections: 32 - Name: .debug_foo 33 Type: SHT_PROGBITS 34 AddressAlign: 0x0000000000000001 35 # "ZLIB" 36 Content: 5A4C49420000000000000000 37 - Name: .debug_bar 38 Type: SHT_PROGBITS 39 AddressAlign: 0x0000000000000001 40 # "ZZZZ" 41 Content: 5A5A5A5A0000000000000000 42