[llvm] [BOLT] Support SHF_COMPRESSED DWARF debug sections. (PR #215835)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 13 06:11:39 PDT 2026
================
@@ -0,0 +1,24 @@
+// Checks that BOLT can correctly decompress, process and recompress zlib
+// compressed DWARF debug information.
+//
+// REQUIRES: zlib
+//
+// RUN: %clang %cflags -g %s -o %t.exe
+// RUN: llvm-objcopy --compress-debug-sections=zlib %t.exe %t.zlib
+// RUN: llvm-readelf -t %t.zlib | FileCheck %s --check-prefix=INPUT-ELF
+// INPUT-ELF: .debug_info
+// INPUT-ELF: COMPRESSED
+// INPUT-ELF-NEXT: ZLIB,
+//
+// RUN: llvm-bolt %t.zlib -o %t.bolt.exe --update-debug-sections
+// RUN: llvm-readelf -t %t.bolt.exe | FileCheck %s --check-prefix=BOLTED-ELF
+// BOLTED-ELF: .debug_info
+// BOLTED-ELF-NEXT: {{.*}}PROGBITS
+// BOLTED-ELF-NEXT: {{.*}}COMPRESSED
+// BOLTED-ELF-NEXT: {{.*}}ZLIB,
+//
+// RUN: llvm-dwarfdump --verify %t.bolt.exe 2>&1 | FileCheck %s --check-prefix=VERIFY-DWARF
+// VERIFY-DWARF: No errors.
+
+int square(int x) { return x * x; }
----------------
andreasmullen wrote:
Hi @aaupov, thanks for the review. I should have just made the changes to the test files now.
https://github.com/llvm/llvm-project/pull/215835
More information about the llvm-commits
mailing list