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=info %t | FileCheck --check-prefix=INFO %s
4
// RUN: llvm-mc -filetype=obj -compress-debug-sections -triple i386-pc-linux-gnu < %s \
5
// RUN: | llvm-readobj -symbols - | FileCheck --check-prefix=386-SYMBOLS %s
9
// CHECK: Contents of section .zdebug_line:
10
// Check for the 'ZLIB' file magic at the start of the section only
14
// Don't compress small sections, such as this simple debug_abbrev example
15
// CHECK: Contents of section .debug_abbrev:
17
// CHECK-NOT: Contents of
19
// CHECK: Contents of section .debug_info:
21
// FIXME: Handle compressing alignment fragments to support compressing debug_frame
22
// CHECK: Contents of section .debug_frame:
26
// Decompress one valid dwarf section just to check that this roundtrips
27
// INFO: 0x00000000: Compile Unit: length = 0x0000000c version = 0x0004 abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000010)
29
// In x86 32 bit named symbols are used for temporary symbols in merge
30
// sections, so make sure we handle symbols inside compressed sections
31
// 386-SYMBOLS: Name: .Linfo_string0
33
// 386-SYMBOLS: Section: .zdebug_str
35
.section .debug_line,"",@progbits
37
.section .debug_abbrev,"",@progbits
39
.byte 1 # Abbreviation Code
40
.byte 17 # DW_TAG_compile_unit
41
.byte 0 # DW_CHILDREN_no
42
.byte 27 # DW_AT_comp_dir
43
.byte 14 # DW_FORM_strp
47
.section .debug_info,"",@progbits
48
.long 12 # Length of Unit
49
.short 4 # DWARF version number
50
.long .Lsection_abbrev # Offset Into Abbrev. Section
51
.byte 8 # Address Size (in bytes)
52
.byte 1 # Abbrev [1] DW_TAG_compile_unit
53
.long .Linfo_string0 # DW_AT_comp_dir
59
# pad out the line table to make sure it's big enough to warrant compression
75
.cfi_sections .debug_frame
77
.section .debug_str,"MS",@progbits,1
79
.asciz "compress this "