[llvm] [doc] Add missing info for multiply specifiable objcopy opts (PR #111153)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 06:35:43 PDT 2024


https://github.com/bd1976bris created https://github.com/llvm/llvm-project/pull/111153

Some objcopy options can usefully be specified multiple times. The text for most of the options where this is true explicitly note this. Add this info to the text for the options which don't currently explicitly note this.

>From df7f851e90a11787c4754dbefd484c45b7fe37f9 Mon Sep 17 00:00:00 2001
From: bd1976bris <bd1976llvm at gmail.com>
Date: Fri, 4 Oct 2024 14:33:10 +0100
Subject: [PATCH] [doc] Add missing info for multiply specifiable objcopy opts

Some objcopy options can usefully be specified multiple times. The text for most of the options where this is true explicitly note this. Add this info to the text for the options which don't currently explicitly note this.
---
 llvm/docs/CommandGuide/llvm-objcopy.rst | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/llvm/docs/CommandGuide/llvm-objcopy.rst b/llvm/docs/CommandGuide/llvm-objcopy.rst
index e6af47ce9710a6..b2ee8ac739d63d 100644
--- a/llvm/docs/CommandGuide/llvm-objcopy.rst
+++ b/llvm/docs/CommandGuide/llvm-objcopy.rst
@@ -120,7 +120,8 @@ multiple file formats.
 .. option:: --remove-symbol-prefix <prefix>
 
  Remove ``<prefix>`` from the start of every symbol name. No-op for symbols that do
- not start with ``<prefix>``.
+ not start with ``<prefix>``. Can be specified multiple times to remove multiple
+ ``<prefix>``es.
 
 .. option:: --remove-section <section>, -R
 
@@ -210,7 +211,8 @@ multiple file formats.
 .. option:: --strip-unneeded-symbol <symbol>
 
  Remove from the output all symbols named ``<symbol>`` that are local or
- undefined and are not required by any relocation.
+ undefined and are not required by any relocation. Can be specified multiple
+ times to remove multiple symbols.
 
 .. option:: --strip-unneeded-symbols <filename>
 
@@ -229,7 +231,8 @@ multiple file formats.
 
  Replace the contents of the section ``<name>`` with contents from the file
  ``<file>``. If the section ``<name>`` is part of a segment, the new contents
- cannot be larger than the existing section.
+ cannot be larger than the existing section. Can be specified multiple times
+ to replace the contents of multiple sections.
 
 .. option:: --version, -V
 
@@ -483,16 +486,20 @@ them.
 .. option:: --set-symbol-visibility <symbol>=<visibility>
 
  Change the visibility of a symbol to the specified value.
+ Visibility values: default, internal, hidden, protected. Can be specified
+ multiple times to change the visibility of multiple symbols.
 
 .. option:: --set-symbols-visibility <filename>=<visibility>
 
  Read a list of symbols from <filename> and change their visibility to the
  specified value. Visibility values: default, internal, hidden, protected.
+ Can be specified multiple times to read symbols from multiple files.
 
 .. option:: --skip-symbol <symbol>
 
  Do not change the parameters of symbol ``<symbol>`` when executing other
- options that can change the symbol's name, binding or visibility.
+ options that can change the symbol's name, binding or visibility. Can be
+ specified multiple times to skip multiple symbols.
 
 .. option:: --skip-symbols <filename>
 
@@ -600,7 +607,7 @@ options. For GNU :program:`objcopy` compatibility, the values are all bfdnames.
 - `elf64-loongarch`
 - `elf64-s390`
 
-The following formats are suppoprted by :program:`llvm-objcopy` for the
+The following formats are supported by :program:`llvm-objcopy` for the
 :option:`--output-target` only:
 
 - `srec`



More information about the llvm-commits mailing list