From f2e85c3101e34c602ac0342e51c335ac1cb0ae2a Mon Sep 17 00:00:00 2001 From: James Henderson Date: Tue, 23 Feb 2021 13:55:48 +0000 Subject: [PATCH] [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 --- llvm/docs/CommandGuide/llvm-objcopy.rst | 2 +- llvm/docs/CommandGuide/llvm-strip.rst | 2 +- llvm/tools/llvm-objcopy/CommonOpts.td | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/llvm/docs/CommandGuide/llvm-objcopy.rst b/llvm/docs/CommandGuide/llvm-objcopy.rst index c4e3b6e..d4e05df 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
= diff --git a/llvm/docs/CommandGuide/llvm-strip.rst b/llvm/docs/CommandGuide/llvm-strip.rst index a40537b..983fba7 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 6481d1d..0661b6b 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, HelpText<"Alias for --discard-all">; -- 2.7.4