Skip to content

Commit 3bad961

Browse files
committed
[llvm-objcopy][docs] Add missing options to the help output and the command guide
This change is to keep the help text and command guide of objcopy in tandem. - In the help output the options --rename-section and --set-section-flags were missing the flag exclude, which is found in the command guide. - In the command guide the alias -G for --keep-global-symbol was missing, which is found in the help output. Differential Revision: https://reviews.llvm.org/D110340
1 parent efb284c commit 3bad961

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

llvm/docs/CommandGuide/llvm-objcopy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ them.
338338

339339
Keep symbols of type `STT_FILE`, even if they would otherwise be stripped.
340340

341-
.. option:: --keep-global-symbol <symbol>
341+
.. option:: --keep-global-symbol <symbol>, -G
342342

343343
Make all symbols local in the output, except for symbols with the name
344344
``<symbol>``. Can be specified multiple times to ignore multiple symbols.

llvm/tools/llvm-objcopy/ObjcopyOpts.td

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ defm rename_section
5050
: Eq<"rename-section",
5151
"Renames a section from old to new, optionally with specified flags. "
5252
"Flags supported for GNU compatibility: alloc, load, noload, "
53-
"readonly, debug, code, data, rom, share, contents, merge, strings.">,
53+
"readonly, exclude, debug, code, data, rom, share, contents, merge, "
54+
"strings.">,
5455
MetaVarName<"old=new[,flag1,...]">;
5556
defm redefine_symbol
5657
: Eq<"redefine-sym", "Change the name of a symbol old to new">,
@@ -82,8 +83,8 @@ defm set_section_alignment
8283
defm set_section_flags
8384
: Eq<"set-section-flags",
8485
"Set section flags for a given section. Flags supported for GNU "
85-
"compatibility: alloc, load, noload, readonly, debug, code, data, "
86-
"rom, share, contents, merge, strings.">,
86+
"compatibility: alloc, load, noload, readonly, exclude, debug, code, "
87+
"data, rom, share, contents, merge, strings.">,
8788
MetaVarName<"section=flag1[,flag2,...]">;
8889

8990
def S : Flag<["-"], "S">,

0 commit comments

Comments
 (0)