4 // RUN
: llvm-mc
-filetype
=obj
-compress-debug-sections
=zlib
-triple x86_64-pc-linux-gnu
< %s
-o
%t
5 // RUN
: llvm-objdump
-s
%t | FileCheck
%s
6 // RUN
: llvm-dwarfdump
-debug-str
%t | FileCheck
--check-prefix
=STR
%s
7 // RUN
: llvm-readelf
--sections
%t | FileCheck
--check-prefixes
=FLAGS
,FLAGS64
%s
9 // RUN
: llvm-mc
-filetype
=obj
-compress-debug-sections
=zlib
-triple i386-pc-linux-gnu
--defsym I386
=1 %s
-o
%t
10 // RUN
: llvm-readelf
-S
-s
%t | FileCheck
--check-prefixes
=386-SYMBOLS
,FLAGS
,FLAGS32
%s
12 // Decompress one valid dwarf section just to check that this roundtrips
,
13 // we use
.debug_str section for that
14 // STR
: perfectly compressable data sample
*****************************************
17 // Now check the zlib style output
:
19 // Don
't compress small sections, such as this simple debug_abbrev example
20 // CHECK: Contents of section .debug_abbrev:
22 // CHECK-NOT: Contents of
23 // CHECK: Contents of section .debug_info:
24 // FIXME: Handle compressing alignment fragments to support compressing debug_frame
25 // CHECK: Contents of section .debug_frame:
29 # FLAGS: .text PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 00 AX 0 0 4
30 # FLAGS: .nonalloc PROGBITS [[#%x,]] [[#%x,]] 000226 00 0 0 1
32 ## Check that the large .debug_line and .debug_frame have the SHF_COMPRESSED
34 # FLAGS32: .debug_line PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 00 C 0 0 4
35 # FLAGS32: .debug_abbrev PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 00 0 0 1
36 # FLAGS32: .debug_info PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 00 0 0 1
37 # FLAGS32: .debug_frame PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 00 C 0 0 4
39 # FLAGS64: .debug_line PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 00 C 0 0 8
40 # FLAGS64: .debug_abbrev PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 00 0 0 1
41 # FLAGS64: .debug_info PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 00 0 0 1
42 # FLAGS64: .debug_frame PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 00 C 0 0 8
44 # 386-SYMBOLS: Symbol table '.symtab'
45 # 386-SYMBOLS: .debug_str
47 ## Don't compress a section not named .debug_*.
48 .section .nonalloc,"",@progbits
53 .section .debug_line,"",@progbits
55 .section .debug_abbrev,"",@progbits
57 .byte 1 # Abbreviation Code
58 .byte 17 # DW_TAG_compile_unit
59 .byte 0 # DW_CHILDREN_no
60 .byte 27 # DW_AT_comp_dir
61 .byte 14 # DW_FORM_strp
65 .section .debug_info,"",@progbits
66 .long 12 # Length of Unit
67 .short 4 # DWARF version number
68 .long .Lsection_abbrev # Offset Into Abbrev. Section
69 .byte 8 # Address Size (in bytes)
70 .byte 1 # Abbrev [1] DW_TAG_compile_unit
71 .long .Linfo_string0 # DW_AT_comp_dir
84 .cfi_def_cfa_register %ebp
91 .loc 1 1 1 prologue_end
99 .cfi_def_cfa_offset 16
100 .cfi_offset %rbp, -16
102 .cfi_def_cfa_register %rbp
108 .cfi_offset %rbx, -56
109 .cfi_offset %r12, -48
110 .cfi_offset %r13, -40
111 .cfi_offset %r14, -32
112 .cfi_offset %r15, -24
113 .loc 1 1 1 prologue_end
124 # pad out the line table to make sure it's big enough to warrant compression
132 .cfi_sections .debug_frame
134 # Below is the section we will use to check that after compression with llvm-mc,
135 # llvm-dwarfdump tool will be able to decompress data back and dump it. Data sample
136 # should be compressable enough, so it is filled with some amount of equal symbols at the end
137 .section .debug_str,"MS",@progbits,1
139 .asciz "perfectly compressable data sample *****************************************"