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

Puyan Lotfi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 20:25:47 PDT 2018


plotfi marked an inline comment as done.
plotfi added inline comments.


================
Comment at: tools/llvm-objcopy/Object.h:366
+public:
+  CompressedSection(StringRef NewName, ArrayRef<uint8_t> Data,
+                    const SectionBase &Sec)
----------------
plotfi wrote:
> jakehehrlich wrote:
> > I think you'll want to put the compression of the Data here personally. Not a blocker to an LGTM but a preference of mine. That way you can store the information needed to construct the header here rather than importing the compressed data. It will give a nicer interface I think.
> I still need to think about how to do this, because while it is a nicer interface I do want the compressed section to replace the original _only if_ it is smaller. 
I think one way I could move the compression into CompressedData is for CompressedData to Write the original non-compressed data in the case where the compression makes things worse. This would cause modifications in the file though, if that's Ok then I can implement the compression in CompresssedSection or in the CompresssedSection writer. What do you think? 


Repository:
  rL LLVM

https://reviews.llvm.org/D49678





More information about the llvm-commits mailing list