[llvm-objcopy] Dwarf .debug section compression support (zlib, zlib-gnu).
authorPuyan Lotfi <puyan@puyan.org>
Mon, 3 Sep 2018 22:25:56 +0000 (22:25 +0000)
committerPuyan Lotfi <puyan@puyan.org>
Mon, 3 Sep 2018 22:25:56 +0000 (22:25 +0000)
commit5a40cd5b50e15ea5125904a1d389dadf8ac8647d
tree07ed326b9b4b746a35468a62130680f73f0aced9
parent0945959869dfc7c8ef13c2eecc55c6d5f260c1d2
[llvm-objcopy] Dwarf .debug section compression support (zlib, zlib-gnu).

  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: 341342
llvm/test/tools/llvm-objcopy/Inputs/compress-debug-sections.yaml [new file with mode: 0644]
llvm/test/tools/llvm-objcopy/compress-debug-sections-default-gnu.test [new file with mode: 0644]
llvm/test/tools/llvm-objcopy/compress-debug-sections-default.test [new file with mode: 0644]
llvm/test/tools/llvm-objcopy/compress-debug-sections-invalid-format.test [new file with mode: 0644]
llvm/test/tools/llvm-objcopy/compress-debug-sections-zlib-gnu.test [new file with mode: 0644]
llvm/test/tools/llvm-objcopy/compress-debug-sections-zlib.test [new file with mode: 0644]
llvm/tools/llvm-objcopy/ObjcopyOpts.td
llvm/tools/llvm-objcopy/Object.cpp
llvm/tools/llvm-objcopy/Object.h
llvm/tools/llvm-objcopy/llvm-objcopy.cpp