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

Puyan Lotfi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 31 11:08:15 PDT 2018


plotfi marked 9 inline comments as done.
plotfi added inline comments.


================
Comment at: test/tools/llvm-objcopy/compress-debug-sections-zlib-gnu.test:32
+# NOTE: Zlib compression makes things worse in this case.
+# SIZE-ORIGINAL: 637
+# SIZE-COMPRESSED: 656
----------------
plotfi wrote:
> jhenderson wrote:
> > jhenderson wrote:
> > > jhenderson wrote:
> > > > I think it probably makes more sense to get the section size and compare that, rather than the overall file size. You can drop the "wc" calls that way.
> > > Don't do it this way. You can use the section size field directly (available in the sections dump from earlier), rather than extracting the sections.
> > > I think it probably makes more sense to get the section size and compare that, rather than the overall file size. You can drop the "wc" calls that way.
> > 
> > > Don't do it this way. You can use the section size field directly (available in the sections dump from earlier), rather than extracting the sections.
> > Why have you marked these as done? They aren't done.
> Missed what you meant in your comment. Sorry. 
I believe the removed of these wc runs probably is what you would like. Let me know otherwise. 


================
Comment at: test/tools/llvm-objcopy/compress-debug-sections-zlib-gnu.test:7-8
+# RUN: llvm-objdump -s %t.o -section=.debug_foo | FileCheck %s
+# RUN: llvm-objdump -s %t-compressed.o | FileCheck %s --check-prefix=CHECK-COMPRESSED
+# RUN: llvm-readobj -s %t-compressed.o | FileCheck %s --check-prefix=CHECK-FLAGS
+
----------------
jhenderson wrote:
> plotfi wrote:
> > jhenderson wrote:
> > > jhenderson wrote:
> > > > Is there a particular reason you aren't doing the two checks in the same run of FileCheck?
> > > Make that four... I think you should be able to simplify the number of runs down by using multiple switches in the same command-line (e.g. -relocations and -s in llvm-readobj).
> > Different tools?
> I missed that originally, but you still don't need two calls to each tool. One each would suffice, assuming that the information we want isn't available in any single dump available via one of those. For example, you can do:
> ```
> # RUN: llvm-readobj -relocations -s %t-compressed.o
> ```
> to get the relocations and section headers.
> 
I hope this is reduced enough to your liking. 


Repository:
  rL LLVM

https://reviews.llvm.org/D49678





More information about the llvm-commits mailing list