summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objcopy/ELF/decompress-sections.test
blob: 4258ddbe66a3e5f036714bddb603e291044360be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# REQUIRES: zlib
## Test decompression for different sections.

# RUN: yaml2obj %s -o %t
# RUN: llvm-objcopy --decompress-debug-sections %t %t.de
# RUN: llvm-readelf -S %t.de | FileCheck %s

# CHECK:        Name              Type            Address          Off      Size     ES Flg Lk Inf Al
# CHECK:        .debug_alloc      PROGBITS        0000000000000000 [[#%x,]] [[#%x,]] 00  AC  0   0  0
# CHECK-NEXT:   .debug_nonalloc   PROGBITS        0000000000000000 [[#%x,]] [[#%x,]] 00      0   0  1
# CHECK-NEXT:   .debugx           PROGBITS        0000000000000000 [[#%x,]] [[#%x,]] 00      0   0  1
# CHECK-NEXT:   nodebug           PROGBITS        0000000000000000 [[#%x,]] [[#%x,]] 00   C  0   0  0

--- !ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2LSB
  Type:    ET_REL
  Machine: EM_X86_64
Sections:
  - Name:      .debug_alloc
    Type:      SHT_PROGBITS
    Flags:     [ SHF_ALLOC, SHF_COMPRESSED ]
    Content:   010000000000000040000000000000000100000000000000789cd36280002d3269002f800151
  - Name:      .debug_nonalloc
    Type:      SHT_PROGBITS
    Flags:     [ SHF_COMPRESSED ]
    Content:   010000000000000040000000000000000100000000000000789cd36280002d3269002f800151
  - Name:      .debugx
    Type:      SHT_PROGBITS
    Flags:     [ SHF_COMPRESSED ]
    Content:   010000000000000040000000000000000100000000000000789cd36280002d3269002f800151
  - Name:      nodebug
    Type:      SHT_PROGBITS
    Flags:     [ SHF_COMPRESSED ]
    Content:   010000000000000040000000000000000100000000000000789cd36280002d3269002f800151