3 # RUN: llvm-mc -filetype=obj -triple=x86_64 --compress-debug-sections=zstd %s -o %t.o
5 # RUN: ld.lld %t.o -o %t.so -shared
6 # RUN: llvm-readelf -S -p .debug_str %t.so | FileCheck %s
8 # CHECK: .debug_str PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 01 MS 0 0 1
9 # CHECK: String dump of section '.debug_str':
10 # CHECK-NEXT: [ 0] {{A+}}
11 # CHECK-NEXT: [ 81] short unsigned int
12 # CHECK-NEXT: [ 94] unsigned char
13 # CHECK-NEXT: [ a2] char
14 # CHECK-NEXT: [ a7] long unsigned int
15 # CHECK-NEXT: [ b9] unsigned int
17 # RUN: ld.lld %t.o -o %t.so -shared --compress-debug-sections=zstd
18 # RUN: llvm-readelf -S %t.so | FileCheck %s --check-prefix=OUTPUT-SEC
19 # RUN: llvm-objcopy --decompress-debug-sections %t.so
20 # RUN: llvm-readelf -S -p .debug_str %t.so | FileCheck %s
22 # OUTPUT-SEC: .debug_str PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 01 MSC 0 0 1
23 # OUTPUT-SEC-NEXT: .debug_frame PROGBITS [[#%x,]] [[#%x,]] 000000 00 0 0 1
24 # OUTPUT-SEC-NEXT: .debug_loc PROGBITS [[#%x,]] [[#%x,]] 000010 00 0 0 1
26 .section .debug_str,"MS",@progbits,1
28 .string "short unsigned int"
30 .string "unsigned int"
32 .string "long unsigned int"
36 .string "unsigned char"
41 ## Test sections where compressed content would be larger.
42 .section .debug_frame,""
43 .section .debug_loc,""