[PATCH] D49678: [llvm-objcopy] Adding support for compressed DWARF debug sections.

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 31 18:00:54 PDT 2018


alexshap added inline comments.


================
Comment at: tools/llvm-objcopy/Object.h:242
+  ELFWriter(Object &Obj, Buffer &Buf, bool WSH,
+            DebugCompressionType CompressDebugSections)
+      : Writer(Obj, Buf), WriteSectionHeaders(WSH) {
----------------
jakehehrlich wrote:
> Hmm...I think I'd prefer this be handled at the section level so that the writer never needs to know about this. I think for each section to be compressed that an OwnedDataSection containing the compressed data should be added.
@jakehehrlich , @jhenderson  - so I've looked at the patch and have been thinking about it for a little bit of time - maybe the following approach (see below) might work / or might not - what do you think ?

approach: (rough idea, the details might need some elaboration): 
    OwnedDebugSection compressDebugSection(
          const Section& DebugSection,  ElfType ET, bool IsGnuStyle) {
          ...
    } 

or return a subclass of OwnedDebugSection - smth like CompressedDebugSection if OwnedDebugSection is not suitable / flexible enough.

then inside HandleArgs the old debug sections will be removed and the new ones (compressed) added.  

 


Repository:
  rL LLVM

https://reviews.llvm.org/D49678





More information about the llvm-commits mailing list