| 1 |
# REQUIRES: zlib |
| 2 |
|
| 3 |
## In this test, we check how llvm-objcopy handles compression/decompression |
| 4 |
## of debug sections included in a COMDAT group. |
| 5 |
|
| 6 |
# RUN: yaml2obj %p/Inputs/compress-debug-sections.yaml -o %t.o |
| 7 |
|
| 8 |
## Check compression of debug sections. |
| 9 |
# RUN: llvm-objcopy --compress-debug-sections %t.o %t-compressed.o |
| 10 |
# RUN: llvm-readobj -S --section-groups %t-compressed.o | \ |
| 11 |
# RUN: FileCheck %s --check-prefixes=CHECK,COMPRESS |
| 12 |
|
| 13 |
## Check decompression of debug sections. |
| 14 |
# RUN: llvm-objcopy --decompress-debug-sections %t-compressed.o %t-decompressed.o |
| 15 |
# RUN: llvm-readobj --section-groups %t-decompressed.o | \ |
| 16 |
# RUN: FileCheck %s --check-prefixes=CHECK,DECOMPRESS |
| 17 |
|
| 18 |
# COMPRESS: Name: .debug_in_group |
| 19 |
# COMPRESS-NEXT: Type: SHT_PROGBITS |
| 20 |
# COMPRESS-NEXT: Flags [ |
| 21 |
# COMPRESS-NEXT: SHF_COMPRESSED |
| 22 |
# COMPRESS-NEXT: SHF_GROUP |
| 23 |
# COMPRESS-NEXT: ] |
| 24 |
|
| 25 |
# CHECK: Group { |
| 26 |
# CHECK-NEXT: Name: .group |
| 27 |
# CHECK-NEXT: Index: |
| 28 |
# CHECK-NEXT: Link: |
| 29 |
# CHECK-NEXT: Info: |
| 30 |
# CHECK-NEXT: Type: COMDAT |
| 31 |
# CHECK-NEXT: Signature: groupname |
| 32 |
# CHECK-NEXT: Section(s) in group [ |
| 33 |
# CHECK-NEXT: .text.in.group |
| 34 |
# COMPRESS-NEXT: .debug_in_group |
| 35 |
# DECOMPRESS-NEXT: .debug_in_group |
| 36 |
# CHECK-NEXT: ] |