[llvm] c975668 - Fix llvm-strip --only-keep-debug documentation for ELF
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 17 23:50:35 PDT 2022
Author: James Henderson
Date: 2022-03-18T06:49:05Z
New Revision: c975668ffc306719db3cbb08a00cb011fc212e13
URL: https://github.com/llvm/llvm-project/commit/c975668ffc306719db3cbb08a00cb011fc212e13
DIFF: https://github.com/llvm/llvm-project/commit/c975668ffc306719db3cbb08a00cb011fc212e13.diff
LOG: Fix llvm-strip --only-keep-debug documentation for ELF
The functionality (and llvm-objcopy's corresponding documentation) was
added in
https://github.com/llvm/llvm-project/commit/5ad0103d8a04cb066dfae4fc20b0dfcd9413f4d4.
It looks like the llvm-strip docs to match were missed.
Reviewed by: gbreynoo
Differential Revision: https://reviews.llvm.org/D121902
Added:
Modified:
llvm/docs/CommandGuide/llvm-strip.rst
Removed:
################################################################################
diff --git a/llvm/docs/CommandGuide/llvm-strip.rst b/llvm/docs/CommandGuide/llvm-strip.rst
index ce5c824ecd5df..b0777991eb901 100644
--- a/llvm/docs/CommandGuide/llvm-strip.rst
+++ b/llvm/docs/CommandGuide/llvm-strip.rst
@@ -59,6 +59,15 @@ multiple file formats.
Write output to <file>. Multiple input files cannot be used in combination
with -o.
+.. option:: --only-keep-debug
+
+ Produce a debug file as the output that only preserves contents of sections
+ useful for debugging purposes.
+
+ For ELF objects, this removes the contents of `SHF_ALLOC` sections that are not
+ `SHT_NOTE` by making them `SHT_NOBITS` and shrinking the program headers where
+ possible.
+
.. option:: --regex
If specified, symbol and section names specified by other switches are treated
@@ -129,18 +138,6 @@ multiple file formats.
Read command-line options and commands from response file `<FILE>`.
-COFF-SPECIFIC OPTIONS
----------------------
-
-The following options are implemented only for COFF objects. If used with other
-objects, :program:`llvm-strip` will either emit an error or silently ignore
-them.
-
-.. option:: --only-keep-debug
-
- Remove the contents of non-debug sections from the output, but keep the section
- headers.
-
ELF-SPECIFIC OPTIONS
--------------------
More information about the llvm-commits
mailing list