[llvm] f2e85c3 - [llvm-objcopy][llvm-strip] Improve --discard-all documentation and help
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 02:33:40 PST 2021
Author: James Henderson
Date: 2021-03-04T10:25:35Z
New Revision: f2e85c3101e34c602ac0342e51c335ac1cb0ae2a
URL: https://github.com/llvm/llvm-project/commit/f2e85c3101e34c602ac0342e51c335ac1cb0ae2a
DIFF: https://github.com/llvm/llvm-project/commit/f2e85c3101e34c602ac0342e51c335ac1cb0ae2a.diff
LOG: [llvm-objcopy][llvm-strip] Improve --discard-all documentation and help
The help text and documentation for the --discard-all option failed to
mention that the option also causes the removal of debug sections. This
change fixes both for both llvm-objcopy and llvm-strip.
Reviewed by: MaskRay
Differential Revision: https://reviews.llvm.org/D97662
Added:
Modified:
llvm/docs/CommandGuide/llvm-objcopy.rst
llvm/docs/CommandGuide/llvm-strip.rst
llvm/tools/llvm-objcopy/CommonOpts.td
Removed:
################################################################################
diff --git a/llvm/docs/CommandGuide/llvm-objcopy.rst b/llvm/docs/CommandGuide/llvm-objcopy.rst
index c4e3b6ee1764..d4e05df03ee0 100644
--- a/llvm/docs/CommandGuide/llvm-objcopy.rst
+++ b/llvm/docs/CommandGuide/llvm-objcopy.rst
@@ -59,7 +59,7 @@ multiple file formats.
Remove most local symbols from the output. Different file formats may limit
this to a subset of the local symbols. For example, file and section symbols in
- ELF objects will not be discarded.
+ ELF objects will not be discarded. Additionally, remove all debug sections.
.. option:: --dump-section <section>=<file>
diff --git a/llvm/docs/CommandGuide/llvm-strip.rst b/llvm/docs/CommandGuide/llvm-strip.rst
index a40537bd51c1..983fba749b38 100644
--- a/llvm/docs/CommandGuide/llvm-strip.rst
+++ b/llvm/docs/CommandGuide/llvm-strip.rst
@@ -39,7 +39,7 @@ multiple file formats.
Remove most local symbols from the output. Different file formats may limit
this to a subset of the local symbols. For example, file and section symbols in
- ELF objects will not be discarded.
+ ELF objects will not be discarded. Additionally, remove all debug sections.
.. option:: --enable-deterministic-archives, -D
diff --git a/llvm/tools/llvm-objcopy/CommonOpts.td b/llvm/tools/llvm-objcopy/CommonOpts.td
index 6481d1d1df05..0661b6b0f2d9 100644
--- a/llvm/tools/llvm-objcopy/CommonOpts.td
+++ b/llvm/tools/llvm-objcopy/CommonOpts.td
@@ -99,7 +99,8 @@ def X : Flag<["-"], "X">,
def discard_all
: Flag<["--"], "discard-all">,
- HelpText<"Remove all local symbols except file and section symbols">;
+ HelpText<"Remove all local symbols except file and section symbols. Also "
+ "remove all debug sections">;
def x : Flag<["-"], "x">,
Alias<discard_all>,
HelpText<"Alias for --discard-all">;
More information about the llvm-commits
mailing list