1# REQUIRES: x86, zstd 2 3# RUN: llvm-mc -filetype=obj -triple=x86_64 --compress-debug-sections=zstd %s -o %t.o 4 5# RUN: ld.lld %t.o -o %t.so -shared 6# RUN: llvm-readelf -S -p .debug_str %t.so | FileCheck %s 7 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 16 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 21 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 25 26.section .debug_str,"MS",@progbits,1 27.LASF2: 28 .string "short unsigned int" 29.LASF3: 30 .string "unsigned int" 31.LASF0: 32 .string "long unsigned int" 33.LASF8: 34 .string "char" 35.LASF1: 36 .string "unsigned char" 37.Lunused: 38 .fill 128, 1, 0x41 39 .byte 0 40 41## Test sections where compressed content would be larger. 42.section .debug_frame,"" 43.section .debug_loc,"" 44.space 16 45