From f0954dd27597d202229a3a9f97a0c36d33c09223 Mon Sep 17 00:00:00 2001 From: Puyan Lotfi Date: Thu, 6 Sep 2018 23:59:50 +0000 Subject: [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 --- .../Inputs/compress-debug-sections.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 llvm/test/tools/llvm-objcopy/Inputs/compress-debug-sections.yaml (limited to 'llvm/test/tools/llvm-objcopy/Inputs/compress-debug-sections.yaml') diff --git a/llvm/test/tools/llvm-objcopy/Inputs/compress-debug-sections.yaml b/llvm/test/tools/llvm-objcopy/Inputs/compress-debug-sections.yaml new file mode 100644 index 00000000000..bb1e9e6c338 --- /dev/null +++ b/llvm/test/tools/llvm-objcopy/Inputs/compress-debug-sections.yaml @@ -0,0 +1,21 @@ +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .debug_foo + Type: SHT_PROGBITS + Content: 0000000000000000 + - Name: .notdebug_foo + Type: SHT_PROGBITS + Content: 0000000000000000 + - Name: .rela.debug_foo + Type: SHT_RELA + Info: .debug_foo + Relocations: + - Offset: 0x1 + Symbol: .debug_foo + Type: R_X86_64_32 +... -- cgit v1.2.3