[PATCH] D51841: [llvm-objcopy] Dwarf decompression support.

Puyan Lotfi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 13 10:49:32 PDT 2018


plotfi updated this revision to Diff 165331.
plotfi added a comment.

- using two new classes: DecompressableSection and DecompressedSection.
- When a compressed debug section is encountered in makeSection we create a DecompressableSection instead of a Section so that we can keep track of the DecompressedSize (which we need ELFT to read).
- in handleArgs if the Decompression command line arg is set then we replace all of the DecompressableSections with DecompressedSections. The difference being that the decompressed sections unset the SHF_COMPRESSED flag, undo the .zdebug* naming, and set the Section size (and alignment to DecompressedSize and DecompressedAlign. DecompressedSections Writer function also does the decompressing whereas DecompressableSection just writes the original uncompressed data.


Repository:
  rL LLVM

https://reviews.llvm.org/D51841

Files:
  test/tools/llvm-objcopy/compress-and-decompress-debug-sections-error.test
  test/tools/llvm-objcopy/compress-debug-sections.test
  test/tools/llvm-objcopy/decompress-debug-sections-zlib-gnu.test
  test/tools/llvm-objcopy/decompress-debug-sections-zlib.test
  tools/llvm-objcopy/ObjcopyOpts.td
  tools/llvm-objcopy/Object.cpp
  tools/llvm-objcopy/Object.h
  tools/llvm-objcopy/llvm-objcopy.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51841.165331.patch
Type: text/x-patch
Size: 15981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180913/cbcaacb5/attachment-0001.bin>


More information about the llvm-commits mailing list