3 # RUN: yaml2obj %p/Inputs/compress-debug-sections.yaml -o %t.o
4 # RUN: llvm-objcopy --compress-debug-sections=zlib-gnu %t.o %t-compressed.o
5 # RUN: llvm-objcopy --decompress-debug-sections %t-compressed.o %t-decompressed.o
7 # RUN: llvm-objdump -s %t.o --section=.debug_foo | FileCheck %s
8 # RUN: llvm-objdump -s %t-compressed.o | FileCheck %s --check-prefix=CHECK-COMPRESSED
9 # RUN: llvm-readobj --relocations -S %t-compressed.o | FileCheck %s --check-prefix=CHECK-FLAGS
10 # RUN: llvm-readobj --relocations -S %t-decompressed.o | FileCheck %s --check-prefix=CHECK-HEADER
11 # RUN: llvm-readobj --relocations -S %t.o | FileCheck %s --check-prefix=CHECK-HEADER
12 # RUN: llvm-objdump -s %t-decompressed.o --section=.debug_foo | FileCheck %s
15 # CHECK-NEXT: 0000 00000000 00000000
17 # CHECK-HEADER: Name: .debug_foo
18 # CHECK-HEADER-NEXT: Type: SHT_PROGBITS
19 # CHECK-HEADER-NEXT: Flags [
20 # CHECK-HEADER-NEXT: ]
21 # CHECK-HEADER-NEXT: Address:
22 # CHECK-HEADER-NEXT: Offset:
23 # CHECK-HEADER-NEXT: Size: 8
25 # CHECK-COMPRESSED: .zdebug_foo:
26 # CHECK-COMPRESSED: ZLIB
27 # CHECK-COMPRESSED: .notdebug_foo:
29 # CHECK-FLAGS-NOT: Name: .debug_foo
30 # CHECK-FLAGS: Name: .zdebug_foo
31 # CHECK-FLAGS-NEXT: Type: SHT_PROGBITS
32 # CHECK-FLAGS-NEXT: Flags [
34 # CHECK-FLAGS-NEXT: Address:
35 # CHECK-FLAGS-NEXT: Offset:
36 # CHECK-FLAGS-NEXT: Size: 23
38 # CHECK-FLAGS: Name: .notdebug_foo
39 # CHECK-FLAGS-NEXT: Type: SHT_PROGBITS
40 # CHECK-FLAGS-NEXT: Flags [
42 # CHECK-FLAGS-NEXT: Address:
43 # CHECK-FLAGS-NEXT: Offset:
44 # CHECK-FLAGS-NEXT: Size: 8
46 # CHECK-FLAGS: Name: .rela.debug_foo
47 # CHECK-FLAGS-NEXT: Type: SHT_RELA
48 # CHECK-FLAGS-NEXT: Flags [
51 # CHECK-FLAGS: Relocations [
52 # CHECK-FLAGS-NEXT: .rela.debug_foo {
53 # CHECK-FLAGS-NEXT: 0x1 R_X86_64_32 .zdebug_foo 0x0
54 # CHECK-FLAGS-NEXT: 0x2 R_X86_64_32 .notdebug_foo 0x0