xref: /llvm-project-15.0.7/lld/test/ELF/compress-debug-sections.s (revision f2a8bccf)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86, zlib
2
3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
4# RUN: ld.lld %t.o -o %t1 --compress-debug-sections=zlib
5
6# RUN: llvm-objdump -s %t1 | FileCheck %s --check-prefix=ZLIBCONTENT
7# ZLIBCONTENT:     Contents of section .debug_str:
8# ZLIBCONTENT-NOT: AAAAAAAAA
9
10# RUN: llvm-readobj -s %t1 | FileCheck %s --check-prefix=ZLIBFLAGS
11# ZLIBFLAGS:       Section {
12# ZLIBFLAGS:         Index:
13# ZLIBFLAGS:         Name: .debug_str
14# ZLIBFLAGS-NEXT:    Type: SHT_PROGBITS
15# ZLIBFLAGS-NEXT:    Flags [
16# ZLIBFLAGS-NEXT:      SHF_COMPRESSED
17
18# RUN: llvm-dwarfdump %t1 -debug-dump=str | \
19# RUN:   FileCheck %s --check-prefix=DEBUGSTR
20# DEBUGSTR:     .debug_str contents:
21# DEBUGSTR-NEXT:  AAAAAAAAAAAAAAAAAAAAAAAAAAA
22# DEBUGSTR-NEXT:  BBBBBBBBBBBBBBBBBBBBBBBBBBB
23
24# RUN: not ld.lld %t.o -o %t1 --compress-debug-sections=zlib-gabi 2>&1 | \
25# RUN:   FileCheck -check-prefix=ERR %s
26# ERR: unknown --compress-debug-sections value: zlib-gabi
27
28.section .debug_str,"MS",@progbits,1
29.Linfo_string0:
30  .asciz "AAAAAAAAAAAAAAAAAAAAAAAAAAA"
31.Linfo_string1:
32  .asciz "BBBBBBBBBBBBBBBBBBBBBBBBBBB"
33

served by {OpenGrok

Last Index Update: Fri May 15 20:09:11 GMT 2026