5 Commits

Author SHA1 Message Date
Puyan Lotfi
ac820be777 [llvm-objcopy] Dwarf .debug section compression support (zlib, zlib-gnu).
Third Attempt:
    - Alignment issues resolved.
    - zlib::isAvailable() detected.
    - ArrayRef misuse fixed.

  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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341635 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-07 08:10:22 +00:00
Puyan Lotfi
df0bc37389 Revert: [llvm-objcopy] Dwarf .debug section compression (Second Attempt).
Various bots still fail for unknown reason.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341613 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-07 00:28:25 +00:00
Puyan Lotfi
ea363334ce [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341607 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-06 23:59:50 +00:00
Chandler Carruth
cf0bf50e16 Revert r341342: Dwarf .debug section compression support (zlib, zlib-gnu).
Also reverts follow-up commits r341343 and r341344.

The primary commit continues to break some build bots even after the
fixes in r341343 for UBSan issues:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/5823

It is also failing for me locally (linux, x86-64).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341360 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-04 11:55:57 +00:00
Puyan Lotfi
341c1a8af7 [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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341342 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-03 22:25:56 +00:00