[PATCH] D67137: [llvm-objcopy] Implement --only-keep-debug for ELF

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 02:37:35 PDT 2019


jhenderson added inline comments.


================
Comment at: llvm/docs/CommandGuide/llvm-objcopy.rst:72
+
+ Produce a separate debug file that only preserves contents of sections useful
+ for debugging purposes.
----------------
I don't think "separate" should be used here, as it implies to me that the output of this operation is not the normal output file. Perhaps change this sentence to "Produce a debug file as the output that only preserves contents of sections useful for debugging purposes."


================
Comment at: llvm/docs/CommandGuide/llvm-objcopy.rst:75-76
+
+ For ELF objects, this removes the contents of `SHF_ALLOC` sections that are
+ not `SHT_NOTE`.
+
----------------
I'd add "by making them SHT_NOBITS and shrinking the program headers where possible."


================
Comment at: llvm/tools/llvm-objcopy/CommonOpts.td:89
     : Flag<["--"], "only-keep-debug">,
-      HelpText<"Clear sections that would not be stripped by --strip-debug. "
-               "Currently only implemented for COFF.">;
+      HelpText<"Produce a separate debug file that only preserves contents of "
+               "sections useful for debugging purposes">;
----------------
Same comment as the documentation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67137/new/

https://reviews.llvm.org/D67137





More information about the llvm-commits mailing list