From: James Henderson Date: Thu, 17 Mar 2022 11:36:42 +0000 (+0000) Subject: Fix llvm-strip --only-keep-debug documentation for ELF X-Git-Tag: upstream/15.0.7~13168 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c975668ffc306719db3cbb08a00cb011fc212e13;p=platform%2Fupstream%2Fllvm.git 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 --- diff --git a/llvm/docs/CommandGuide/llvm-strip.rst b/llvm/docs/CommandGuide/llvm-strip.rst index ce5c824..b077799 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 . 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 ``. -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 --------------------