2 ## Test decompression for different sections.
4 # RUN: yaml2obj %s -o %t
5 # RUN: llvm-objcopy --decompress-debug-sections %t %t.de
6 # RUN: llvm-readelf -S %t.de | FileCheck %s
7 # RUN: llvm-objcopy --compress-sections '*nonalloc=none' --compress-sections .debugx=none %t %t.1.de
8 # RUN: cmp %t.de %t.1.de
10 # CHECK: Name Type Address Off Size ES Flg Lk Inf Al
11 # CHECK: .debug_alloc PROGBITS 0000000000000000 [[#%x,]] [[#%x,]] 00 AC 0 0 0
12 # CHECK-NEXT: .debug_nonalloc PROGBITS 0000000000000000 [[#%x,]] [[#%x,]] 00 0 0 1
13 # CHECK-NEXT: .debugx PROGBITS 0000000000000000 [[#%x,]] [[#%x,]] 00 0 0 1
14 # CHECK-NEXT: nodebug PROGBITS 0000000000000000 [[#%x,]] [[#%x,]] 00 C 0 0 0
16 # RUN: llvm-objcopy --compress-sections '.debug*=none' %t %t2.de
17 # RUN: llvm-readelf -S -x .debug_alloc -x .debug_nonalloc -x .debugx %t2.de | FileCheck %s --check-prefix=CHECK2
19 # CHECK2: Name Type Address Off Size ES Flg Lk Inf Al
20 # CHECK2: .debug_alloc PROGBITS 0000000000000000 [[#%x,]] [[#%x,]] 00 A 0 0 1
21 # CHECK2-NEXT: .debug_nonalloc PROGBITS 0000000000000000 [[#%x,]] [[#%x,]] 00 0 0 1
22 # CHECK2-NEXT: .debugx PROGBITS 0000000000000000 [[#%x,]] [[#%x,]] 00 0 0 1
23 # CHECK2-NEXT: nodebug PROGBITS 0000000000000000 [[#%x,]] [[#%x,]] 00 C 0 0 0
25 # CHECK2: Hex dump of section '.debug_alloc':
26 # CHECK2-NEXT: 0x00000000 2a000000 00000000 2a000000 00000000 *.......*.......
27 # CHECK2-NEXT: 0x00000010 2a000000 00000000 2a000000 00000000 *.......*.......
28 # CHECK2-NEXT: 0x00000020 2a000000 00000000 2a000000 00000000 *.......*.......
29 # CHECK2-NEXT: 0x00000030 2a000000 00000000 2a000000 00000000 *.......*.......
31 # CHECK2: Hex dump of section '.debug_nonalloc':
32 # CHECK2-NEXT: 0x00000000 2a000000 00000000 2a000000 00000000 *.......*.......
33 # CHECK2-NEXT: 0x00000010 2a000000 00000000 2a000000 00000000 *.......*.......
34 # CHECK2-NEXT: 0x00000020 2a000000 00000000 2a000000 00000000 *.......*.......
35 # CHECK2-NEXT: 0x00000030 2a000000 00000000 2a000000 00000000 *.......*.......
37 # CHECK2-NEXT: Hex dump of section '.debugx':
38 # CHECK2-NEXT: 0x00000000 2a000000 00000000 2a000000 00000000 *.......*.......
39 # CHECK2-NEXT: 0x00000010 2a000000 00000000 2a000000 00000000 *.......*.......
40 # CHECK2-NEXT: 0x00000020 2a000000 00000000 2a000000 00000000 *.......*.......
41 # CHECK2-NEXT: 0x00000030 2a000000 00000000 2a000000 00000000 *.......*.......
52 Flags: [ SHF_ALLOC, SHF_COMPRESSED ]
53 Content: 010000000000000040000000000000000100000000000000789cd36280002d3269002f800151
54 - Name: .debug_nonalloc
56 Flags: [ SHF_COMPRESSED ]
57 Content: 010000000000000040000000000000000100000000000000789cd36280002d3269002f800151
60 Flags: [ SHF_COMPRESSED ]
61 Content: 010000000000000040000000000000000100000000000000789cd36280002d3269002f800151
64 Flags: [ SHF_COMPRESSED ]
65 Content: 010000000000000040000000000000000100000000000000789cd36280002d3269002f800151