Reimplement debug info compression by compressing the whole section, rather than...
[oota-llvm.git] / test / MC / ELF / compression.s
1 // RUN: llvm-mc -filetype=obj -compress-debug-sections -triple x86_64-pc-linux-gnu %s -o %t
2 // RUN: llvm-objdump -s %t | FileCheck %s
3 // RUN: llvm-dwarfdump -debug-dump=abbrev %t | FileCheck --check-prefix=ABBREV %s
4
5 // REQUIRES: zlib
6
7 // CHECK: Contents of section .zdebug_line:
8 // Check for the 'ZLIB' file magic at the start of the section only
9 // CHECK-NEXT: ZLIB
10 // CHECK-NOT: ZLIB
11 // CHECK: Contents of
12
13 // CHECK: Contents of section .zdebug_abbrev:
14 // CHECK-NEXT: ZLIB
15
16 // FIXME: Handle compressing alignment fragments to support compressing debug_frame
17 // CHECK: Contents of section .debug_frame:
18 // CHECK-NOT: ZLIB
19 // CHECK: Contents of
20
21 // Decompress one valid dwarf section just to check that this roundtrips
22 // ABBREV: Abbrev table for offset: 0x00000000
23 // ABBREV: [1] DW_TAG_compile_unit DW_CHILDREN_no
24
25         .section        .debug_line,"",@progbits
26
27         .section        .debug_abbrev,"",@progbits
28         .byte   1                       # Abbreviation Code
29         .byte   17                      # DW_TAG_compile_unit
30         .byte   0                       # DW_CHILDREN_no
31         .byte   0                       # EOM(1)
32         .byte   0                       # EOM(2)
33         .text
34 foo:
35         .cfi_startproc
36         .file 1 "Driver.ii"
37         .loc 1 2 0
38         nop
39         .cfi_endproc
40         .cfi_sections .debug_frame