[llvm] 3ad6f53 - [llvm-objcopy][docs] Update --update-section description
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 4 08:23:21 PDT 2022
Author: gbreynoo
Date: 2022-04-04T16:18:17+01:00
New Revision: 3ad6f535024c5b2c20f64aeea251fe96dbc88d4f
URL: https://github.com/llvm/llvm-project/commit/3ad6f535024c5b2c20f64aeea251fe96dbc88d4f
DIFF: https://github.com/llvm/llvm-project/commit/3ad6f535024c5b2c20f64aeea251fe96dbc88d4f.diff
LOG: [llvm-objcopy][docs] Update --update-section description
I noticed that when --update-section was added to llvm-objcopy it was
not added to the command guide, see
25bcd94234530955c58c6530a9271c813827637c. This change adds it to the
docs and updates the help text.
Differential Revision: https://reviews.llvm.org/D122907
Added:
Modified:
llvm/docs/CommandGuide/llvm-objcopy.rst
llvm/tools/llvm-objcopy/ObjcopyOpts.td
Removed:
################################################################################
diff --git a/llvm/docs/CommandGuide/llvm-objcopy.rst b/llvm/docs/CommandGuide/llvm-objcopy.rst
index 6193d637d0486..9462315f313dd 100644
--- a/llvm/docs/CommandGuide/llvm-objcopy.rst
+++ b/llvm/docs/CommandGuide/llvm-objcopy.rst
@@ -217,6 +217,12 @@ multiple file formats.
Remove from the output all local or undefined symbols that are not required by
relocations. Also remove all debug sections.
+.. option:: --update-section <name>=<file>
+
+ 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.
+
.. option:: --version, -V
Display the version of the :program:`llvm-objcopy` executable.
diff --git a/llvm/tools/llvm-objcopy/ObjcopyOpts.td b/llvm/tools/llvm-objcopy/ObjcopyOpts.td
index bfd66caf41ed0..da6d6c4ef07de 100644
--- a/llvm/tools/llvm-objcopy/ObjcopyOpts.td
+++ b/llvm/tools/llvm-objcopy/ObjcopyOpts.td
@@ -222,5 +222,5 @@ defm add_symbol
MetaVarName<"name=[section:]value[,flags]">;
defm update_section
- : Eq<"update-section", "Add section <name> with contents from a file <file>.">,
+ : Eq<"update-section", "Replace the contents of section <name> with contents from a file <file>.">,
MetaVarName<"name=file">;
More information about the llvm-commits
mailing list