1# REQUIRES: zlib 2 3# RUN: llvm-mc -compress-debug-sections=zlib -filetype=obj -triple=x86_64-unknown-linux %s -o %t 4# RUN: llvm-readobj -sections %t | FileCheck -check-prefix=COMPRESSED %s 5 6# COMPRESSED: Section { 7# COMPRESSED: Index: 2 8# COMPRESSED: Name: .debug_str 9# COMPRESSED-NEXT: Type: SHT_PROGBITS 10# COMPRESSED-NEXT: Flags [ 11# COMPRESSED-NEXT: SHF_COMPRESSED (0x800) 12# COMPRESSED-NEXT: SHF_MERGE (0x10) 13# COMPRESSED-NEXT: SHF_STRINGS (0x20) 14# COMPRESSED-NEXT: ] 15# COMPRESSED-NEXT: Address: 16# COMPRESSED-NEXT: Offset: 17# COMPRESSED-NEXT: Size: 66 18# COMPRESSED-NEXT: Link: 19# COMPRESSED-NEXT: Info: 20# COMPRESSED-NEXT: AddressAlignment: 1 21# COMPRESSED-NEXT: EntrySize: 1 22# COMPRESSED-NEXT: } 23 24# RUN: ld.lld %t -o %t.so -shared 25# RUN: llvm-readobj -sections %t.so | FileCheck -check-prefix=UNCOMPRESSED %s 26 27## Check that section is decompressed and compression flag is removed. 28# UNCOMPRESSED: Section { 29# UNCOMPRESSED: Index: 6 30# UNCOMPRESSED: Name: .debug_str 31# UNCOMPRESSED-NEXT: Type: SHT_PROGBITS 32# UNCOMPRESSED-NEXT: Flags [ 33# UNCOMPRESSED-NEXT: SHF_MERGE (0x10) 34# UNCOMPRESSED-NEXT: SHF_STRINGS (0x20) 35# UNCOMPRESSED-NEXT: ] 36# UNCOMPRESSED-NEXT: Address: 0x0 37# UNCOMPRESSED-NEXT: Offset: 0x1060 38# UNCOMPRESSED-NEXT: Size: 69 39# UNCOMPRESSED-NEXT: Link: 0 40# UNCOMPRESSED-NEXT: Info: 0 41# UNCOMPRESSED-NEXT: AddressAlignment: 1 42# UNCOMPRESSED-NEXT: EntrySize: 1 43# UNCOMPRESSED-NEXT: } 44 45.section .debug_str,"MS",@progbits,1 46.LASF2: 47 .string "short unsigned int" 48.LASF3: 49 .string "unsigned int" 50.LASF0: 51 .string "long unsigned int" 52.LASF8: 53 .string "char" 54.LASF1: 55 .string "unsigned char" 56