aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/CommandGuide/llvm-objcopy.rst
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/docs/CommandGuide/llvm-objcopy.rst')
-rw-r--r--llvm/docs/CommandGuide/llvm-objcopy.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/docs/CommandGuide/llvm-objcopy.rst b/llvm/docs/CommandGuide/llvm-objcopy.rst
index f421106..e9b58d2 100644
--- a/llvm/docs/CommandGuide/llvm-objcopy.rst
+++ b/llvm/docs/CommandGuide/llvm-objcopy.rst
@@ -67,6 +67,15 @@ multiple file formats.
Print a summary of command line options.
+.. 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:: --only-section <section>, -j
Remove all sections from the output, except for sections named ``<section>``.
@@ -177,11 +186,6 @@ The following options are implemented only for COFF objects. If used with other
objects, :program:`llvm-objcopy` 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
--------------------