diff options
| author | Puyan Lotfi <puyan@puyan.org> | 2018-09-06 23:59:50 +0000 |
|---|---|---|
| committer | Puyan Lotfi <puyan@puyan.org> | 2018-09-06 23:59:50 +0000 |
| commit | f0954dd27597d202229a3a9f97a0c36d33c09223 (patch) | |
| tree | 8cf0ae489ca10c0c7f594c4c4493ab9230429748 /llvm/test/tools/llvm-objcopy/compress-debug-sections-default.test | |
| parent | 2c9dede9cba3af244322947357a5b2da644c4db1 (diff) | |
| download | bcm5719-llvm-f0954dd27597d202229a3a9f97a0c36d33c09223.tar.gz bcm5719-llvm-f0954dd27597d202229a3a9f97a0c36d33c09223.zip | |
[llvm-objcopy] Dwarf .debug section compression support (zlib, zlib-gnu).
Second Attempt. Alignment issues resolved. zlib::isAvailable() detected.
Usage:
llvm-objcopy --compress-debug-sections=zlib foo.o
llvm-objcopy --compress-debug-sections=zlib-gnu foo.o
In both cases the debug section contents is compressed with zlib. In the GNU
style case the header is the "ZLIB" magic string followed by the uint64 big-
endian decompressed size. In the non-GNU mode the header is the
Elf(32|64)_Chdr.
Decompression support is coming soon.
Differential Revision: https://reviews.llvm.org/D49678
llvm-svn: 341607
Diffstat (limited to 'llvm/test/tools/llvm-objcopy/compress-debug-sections-default.test')
| -rw-r--r-- | llvm/test/tools/llvm-objcopy/compress-debug-sections-default.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objcopy/compress-debug-sections-default.test b/llvm/test/tools/llvm-objcopy/compress-debug-sections-default.test new file mode 100644 index 00000000000..8ed887da3b0 --- /dev/null +++ b/llvm/test/tools/llvm-objcopy/compress-debug-sections-default.test @@ -0,0 +1,13 @@ +# REQUIRES: zlib + +# RUN: yaml2obj %p/Inputs/compress-debug-sections.yaml -o %t.o +# RUN: llvm-objcopy --compress-debug-sections %t.o %t-compressed.o +# RUN: llvm-readobj -s %t-compressed.o | FileCheck %s + +# CHECK: Name: .debug_foo +# CHECK-NEXT: Type: SHT_PROGBITS +# CHECK-NEXT: Flags [ +# CHECK-NEXT: SHF_COMPRESSED +# CHECK-NEXT: ] +# CHECK-NOT: Name: .debug_foo + |

