2019-08-15 12:45:41 +08:00
|
|
|
include "CommonOpts.td"
|
2019-04-18 17:13:30 +08:00
|
|
|
|
2018-11-02 01:20:40 +08:00
|
|
|
defm binary_architecture
|
2019-09-14 09:36:31 +08:00
|
|
|
: Eq<"binary-architecture", "Ignored for compatibility">;
|
2019-08-15 12:45:41 +08:00
|
|
|
def B : JoinedOrSeparate<["-"], "B">,
|
|
|
|
Alias<binary_architecture>,
|
|
|
|
HelpText<"Alias for --binary-architecture">;
|
2018-11-02 05:38:14 +08:00
|
|
|
|
2018-11-02 01:20:40 +08:00
|
|
|
defm target : Eq<"target", "Format of the input and output file">,
|
2018-10-12 08:36:01 +08:00
|
|
|
Values<"binary">;
|
2019-08-15 12:45:41 +08:00
|
|
|
def F : JoinedOrSeparate<["-"], "F">,
|
|
|
|
Alias<target>,
|
|
|
|
HelpText<"Alias for --target">;
|
2018-11-02 05:38:14 +08:00
|
|
|
|
2018-11-02 01:20:40 +08:00
|
|
|
defm input_target : Eq<"input-target", "Format of the input file">,
|
2018-04-24 13:43:32 +08:00
|
|
|
Values<"binary">;
|
2019-08-15 12:45:41 +08:00
|
|
|
def I : JoinedOrSeparate<["-"], "I">,
|
|
|
|
Alias<input_target>,
|
|
|
|
HelpText<"Alias for --input-target">;
|
2018-11-02 05:38:14 +08:00
|
|
|
|
2018-11-02 01:20:40 +08:00
|
|
|
defm output_target : Eq<"output-target", "Format of the output file">,
|
2018-04-24 13:43:32 +08:00
|
|
|
Values<"binary">;
|
2019-08-15 12:45:41 +08:00
|
|
|
def O : JoinedOrSeparate<["-"], "O">,
|
|
|
|
Alias<output_target>,
|
|
|
|
HelpText<"Alias for --output-target">;
|
2018-11-02 05:38:14 +08:00
|
|
|
|
2019-08-30 18:17:16 +08:00
|
|
|
defm new_symbol_visibility : Eq<"new-symbol-visibility", "Visibility of "
|
|
|
|
"symbols generated for binary input or added"
|
|
|
|
" with --add-symbol unless otherwise"
|
|
|
|
" specified. The default value is 'default'.">;
|
|
|
|
|
[llvm-objcopy] Accept --long-option but not -long-option
Summary:
llvm-{objcopy,strip} (and many other LLVM binary utilities) accept
cl::opt style -long-option as well as many short options (e.g. -p -S
-x). People who use them as replacement of GNU binutils often use the
grouped option syntax (POSIX Utility Conventions), e.g. -Sx => -S -x,
-Wd => -W -d, -sj.text => -s -j.text
There is ambiguity if a long option starts with the character used by a
short option. Drop the support for -long-option to resolve the ambiguity.
This divergence from other utilities is accepted (other utilities
continue supporting -long-option).
https://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html
Reviewers: alexshap, jakehehrlich, jhenderson, rupprecht, espindola
Reviewed By: jakehehrlich, jhenderson, rupprecht
Subscribers: grimar, emaste, arichardson, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60439
llvm-svn: 359265
2019-04-26 10:10:10 +08:00
|
|
|
def compress_debug_sections : Flag<["--"], "compress-debug-sections">;
|
2018-11-02 05:38:14 +08:00
|
|
|
def compress_debug_sections_eq
|
[llvm-objcopy] Accept --long-option but not -long-option
Summary:
llvm-{objcopy,strip} (and many other LLVM binary utilities) accept
cl::opt style -long-option as well as many short options (e.g. -p -S
-x). People who use them as replacement of GNU binutils often use the
grouped option syntax (POSIX Utility Conventions), e.g. -Sx => -S -x,
-Wd => -W -d, -sj.text => -s -j.text
There is ambiguity if a long option starts with the character used by a
short option. Drop the support for -long-option to resolve the ambiguity.
This divergence from other utilities is accepted (other utilities
continue supporting -long-option).
https://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html
Reviewers: alexshap, jakehehrlich, jhenderson, rupprecht, espindola
Reviewed By: jakehehrlich, jhenderson, rupprecht
Subscribers: grimar, emaste, arichardson, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60439
llvm-svn: 359265
2019-04-26 10:10:10 +08:00
|
|
|
: Joined<["--"], "compress-debug-sections=">,
|
2018-11-02 05:38:14 +08:00
|
|
|
MetaVarName<"[ zlib | zlib-gnu ]">,
|
|
|
|
HelpText<"Compress DWARF debug sections using specified style. Supported "
|
|
|
|
"styles: 'zlib-gnu' and 'zlib'">;
|
[llvm-objcopy] Accept --long-option but not -long-option
Summary:
llvm-{objcopy,strip} (and many other LLVM binary utilities) accept
cl::opt style -long-option as well as many short options (e.g. -p -S
-x). People who use them as replacement of GNU binutils often use the
grouped option syntax (POSIX Utility Conventions), e.g. -Sx => -S -x,
-Wd => -W -d, -sj.text => -s -j.text
There is ambiguity if a long option starts with the character used by a
short option. Drop the support for -long-option to resolve the ambiguity.
This divergence from other utilities is accepted (other utilities
continue supporting -long-option).
https://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html
Reviewers: alexshap, jakehehrlich, jhenderson, rupprecht, espindola
Reviewed By: jakehehrlich, jhenderson, rupprecht
Subscribers: grimar, emaste, arichardson, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60439
llvm-svn: 359265
2019-04-26 10:10:10 +08:00
|
|
|
def decompress_debug_sections : Flag<["--"], "decompress-debug-sections">,
|
2018-10-01 18:29:41 +08:00
|
|
|
HelpText<"Decompress DWARF debug sections.">;
|
2018-11-02 01:20:40 +08:00
|
|
|
defm split_dwo
|
|
|
|
: Eq<"split-dwo", "Equivalent to extract-dwo on the input file to "
|
|
|
|
"<dwo-file>, then strip-dwo on the input file">,
|
|
|
|
MetaVarName<"dwo-file">;
|
2018-08-17 02:29:40 +08:00
|
|
|
|
2018-11-02 05:38:14 +08:00
|
|
|
defm add_gnu_debuglink
|
|
|
|
: Eq<"add-gnu-debuglink", "Add a .gnu_debuglink for <debug-file>">,
|
|
|
|
MetaVarName<"debug-file">;
|
2018-08-17 02:29:40 +08:00
|
|
|
|
2018-08-02 00:23:22 +08:00
|
|
|
defm rename_section
|
2018-11-02 01:20:40 +08:00
|
|
|
: Eq<"rename-section",
|
|
|
|
"Renames a section from old to new, optionally with specified flags. "
|
|
|
|
"Flags supported for GNU compatibility: alloc, load, noload, "
|
|
|
|
"readonly, debug, code, data, rom, share, contents, merge, strings.">,
|
|
|
|
MetaVarName<"old=new[,flag1,...]">;
|
2018-11-02 05:38:14 +08:00
|
|
|
defm redefine_symbol
|
|
|
|
: Eq<"redefine-sym", "Change the name of a symbol old to new">,
|
|
|
|
MetaVarName<"old=new">;
|
2019-02-08 18:33:16 +08:00
|
|
|
defm redefine_symbols
|
|
|
|
: Eq<"redefine-syms",
|
|
|
|
"Reads a list of symbol pairs from <filename> and runs as if "
|
|
|
|
"--redefine-sym=<old>=<new> is set for each one. <filename> "
|
|
|
|
"contains two symbols per line separated with whitespace and may "
|
|
|
|
"contain comments beginning with '#'. Leading and trailing "
|
|
|
|
"whitespace is stripped from each line. May be repeated to read "
|
|
|
|
"symbols from many files.">,
|
|
|
|
MetaVarName<"filename">;
|
|
|
|
|
2018-12-06 10:03:53 +08:00
|
|
|
defm only_section : Eq<"only-section", "Remove all but <section>">,
|
|
|
|
MetaVarName<"section">;
|
2019-08-15 12:45:41 +08:00
|
|
|
def j : JoinedOrSeparate<["-"], "j">,
|
|
|
|
Alias<only_section>,
|
|
|
|
HelpText<"Alias for --only-section">;
|
2018-11-02 01:20:40 +08:00
|
|
|
defm add_section
|
|
|
|
: Eq<"add-section",
|
|
|
|
"Make a section named <section> with the contents of <file>.">,
|
|
|
|
MetaVarName<"section=file">;
|
2018-11-02 05:38:14 +08:00
|
|
|
|
2019-10-02 20:41:25 +08:00
|
|
|
defm set_section_alignment
|
|
|
|
: Eq<"set-section-alignment", "Set alignment for a given section.">,
|
|
|
|
MetaVarName<"section=align">;
|
|
|
|
|
[llvm-objcopy] Implement --set-section-flags.
Summary:
--set-section-flags is used to change the section flags (e.g. SHF_ALLOC) for given sections. The flags allowed are the same from the existing --rename-section=.old=.new[,flags] feature.
Additionally, make sure that --set-section-flag cannot be used with --rename-section (either the source or destination), since --rename-section accepts flags. This avoids ambiguity for something like "--rename-section=.foo=.bar,alloc --set-section-flag=.bar,code".
Reviewers: jhenderson, jakehehrlich, alexshap, espindola
Reviewed By: jhenderson, jakehehrlich
Subscribers: llvm-commits, emaste, arichardson
Differential Revision: https://reviews.llvm.org/D57198
llvm-svn: 352505
2019-01-29 23:05:38 +08:00
|
|
|
defm set_section_flags
|
|
|
|
: Eq<"set-section-flags",
|
|
|
|
"Set section flags for a given section. Flags supported for GNU "
|
|
|
|
"compatibility: alloc, load, noload, readonly, debug, code, data, "
|
|
|
|
"rom, share, contents, merge, strings.">,
|
|
|
|
MetaVarName<"section=flag1[,flag2,...]">;
|
|
|
|
|
2019-08-15 12:45:41 +08:00
|
|
|
def S : Flag<["-"], "S">,
|
|
|
|
Alias<strip_all>,
|
|
|
|
HelpText<"Alias for --strip-all">;
|
[llvm-objcopy] Accept --long-option but not -long-option
Summary:
llvm-{objcopy,strip} (and many other LLVM binary utilities) accept
cl::opt style -long-option as well as many short options (e.g. -p -S
-x). People who use them as replacement of GNU binutils often use the
grouped option syntax (POSIX Utility Conventions), e.g. -Sx => -S -x,
-Wd => -W -d, -sj.text => -s -j.text
There is ambiguity if a long option starts with the character used by a
short option. Drop the support for -long-option to resolve the ambiguity.
This divergence from other utilities is accepted (other utilities
continue supporting -long-option).
https://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html
Reviewers: alexshap, jakehehrlich, jhenderson, rupprecht, espindola
Reviewed By: jakehehrlich, jhenderson, rupprecht
Subscribers: grimar, emaste, arichardson, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60439
llvm-svn: 359265
2019-04-26 10:10:10 +08:00
|
|
|
def strip_dwo : Flag<["--"], "strip-dwo">,
|
2018-04-24 13:43:32 +08:00
|
|
|
HelpText<"Remove all DWARF .dwo sections from file">;
|
[llvm-objcopy]Don't implicitly strip sections in segments
This patch changes llvm-objcopy's behaviour to not strip sections that
are in segments, if they otherwise would be due to a stripping operation
(--strip-all, --strip-sections, --strip-non-alloc). This preserves the
segment contents. It does not change the behaviour of --strip-all-gnu
(although we could choose to do so), because GNU objcopy's behaviour in
this case seems to be to strip the section, nor does it prevent removing
of sections in segments with --remove-section (if a user REALLY wants to
remove a section, we should probably let them, although I could be
persuaded that warning might be appropriate). Tests have been added to
show this latter behaviour.
This fixes https://bugs.llvm.org/show_bug.cgi?id=41006.
Reviewed by: grimar, rupprecht, jakehehrlich
Differential Revision: https://reviews.llvm.org/D59293
This is a reland of r356129, attempting to fix greendragon failures
due to a suspected compatibility issue with od on the greendragon bots
versus other versions.
llvm-svn: 356136
2019-03-14 19:47:41 +08:00
|
|
|
def strip_non_alloc
|
[llvm-objcopy] Accept --long-option but not -long-option
Summary:
llvm-{objcopy,strip} (and many other LLVM binary utilities) accept
cl::opt style -long-option as well as many short options (e.g. -p -S
-x). People who use them as replacement of GNU binutils often use the
grouped option syntax (POSIX Utility Conventions), e.g. -Sx => -S -x,
-Wd => -W -d, -sj.text => -s -j.text
There is ambiguity if a long option starts with the character used by a
short option. Drop the support for -long-option to resolve the ambiguity.
This divergence from other utilities is accepted (other utilities
continue supporting -long-option).
https://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html
Reviewers: alexshap, jakehehrlich, jhenderson, rupprecht, espindola
Reviewed By: jakehehrlich, jhenderson, rupprecht
Subscribers: grimar, emaste, arichardson, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60439
llvm-svn: 359265
2019-04-26 10:10:10 +08:00
|
|
|
: Flag<["--"], "strip-non-alloc">,
|
[llvm-objcopy]Don't implicitly strip sections in segments
This patch changes llvm-objcopy's behaviour to not strip sections that
are in segments, if they otherwise would be due to a stripping operation
(--strip-all, --strip-sections, --strip-non-alloc). This preserves the
segment contents. It does not change the behaviour of --strip-all-gnu
(although we could choose to do so), because GNU objcopy's behaviour in
this case seems to be to strip the section, nor does it prevent removing
of sections in segments with --remove-section (if a user REALLY wants to
remove a section, we should probably let them, although I could be
persuaded that warning might be appropriate). Tests have been added to
show this latter behaviour.
This fixes https://bugs.llvm.org/show_bug.cgi?id=41006.
Reviewed by: grimar, rupprecht, jakehehrlich
Differential Revision: https://reviews.llvm.org/D59293
This is a reland of r356129, attempting to fix greendragon failures
due to a suspected compatibility issue with od on the greendragon bots
versus other versions.
llvm-svn: 356136
2019-03-14 19:47:41 +08:00
|
|
|
HelpText<"Remove all non-allocated sections outside segments">;
|
|
|
|
defm strip_unneeded_symbol
|
2019-02-13 15:34:54 +08:00
|
|
|
: Eq<"strip-unneeded-symbol",
|
|
|
|
"Remove symbol <symbol> if it is not needed by relocations">,
|
|
|
|
MetaVarName<"symbol">;
|
|
|
|
defm strip_unneeded_symbols
|
|
|
|
: Eq<"strip-unneeded-symbols",
|
|
|
|
"Reads a list of symbols from <filename> and removes them "
|
|
|
|
"if they are not needed by relocations">,
|
|
|
|
MetaVarName<"filename">;
|
2018-11-02 05:38:14 +08:00
|
|
|
|
|
|
|
def extract_dwo
|
[llvm-objcopy] Accept --long-option but not -long-option
Summary:
llvm-{objcopy,strip} (and many other LLVM binary utilities) accept
cl::opt style -long-option as well as many short options (e.g. -p -S
-x). People who use them as replacement of GNU binutils often use the
grouped option syntax (POSIX Utility Conventions), e.g. -Sx => -S -x,
-Wd => -W -d, -sj.text => -s -j.text
There is ambiguity if a long option starts with the character used by a
short option. Drop the support for -long-option to resolve the ambiguity.
This divergence from other utilities is accepted (other utilities
continue supporting -long-option).
https://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html
Reviewers: alexshap, jakehehrlich, jhenderson, rupprecht, espindola
Reviewed By: jakehehrlich, jhenderson, rupprecht
Subscribers: grimar, emaste, arichardson, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60439
llvm-svn: 359265
2019-04-26 10:10:10 +08:00
|
|
|
: Flag<["--"], "extract-dwo">,
|
2018-11-02 05:38:14 +08:00
|
|
|
HelpText<
|
|
|
|
"Remove all sections that are not DWARF .dwo sections from file">;
|
|
|
|
|
2019-06-08 01:57:48 +08:00
|
|
|
defm extract_partition
|
|
|
|
: Eq<"extract-partition", "Extract named partition from input file">,
|
|
|
|
MetaVarName<"name">;
|
|
|
|
def extract_main_partition
|
|
|
|
: Flag<["--"], "extract-main-partition">,
|
|
|
|
HelpText<"Extract main partition from the input file">;
|
|
|
|
|
2018-11-02 05:38:14 +08:00
|
|
|
def localize_hidden
|
[llvm-objcopy] Accept --long-option but not -long-option
Summary:
llvm-{objcopy,strip} (and many other LLVM binary utilities) accept
cl::opt style -long-option as well as many short options (e.g. -p -S
-x). People who use them as replacement of GNU binutils often use the
grouped option syntax (POSIX Utility Conventions), e.g. -Sx => -S -x,
-Wd => -W -d, -sj.text => -s -j.text
There is ambiguity if a long option starts with the character used by a
short option. Drop the support for -long-option to resolve the ambiguity.
This divergence from other utilities is accepted (other utilities
continue supporting -long-option).
https://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html
Reviewers: alexshap, jakehehrlich, jhenderson, rupprecht, espindola
Reviewed By: jakehehrlich, jhenderson, rupprecht
Subscribers: grimar, emaste, arichardson, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60439
llvm-svn: 359265
2019-04-26 10:10:10 +08:00
|
|
|
: Flag<["--"], "localize-hidden">,
|
2018-11-02 05:38:14 +08:00
|
|
|
HelpText<
|
|
|
|
"Mark all symbols that have hidden or internal visibility as local">;
|
2018-11-02 01:20:40 +08:00
|
|
|
defm localize_symbol : Eq<"localize-symbol", "Mark <symbol> as local">,
|
|
|
|
MetaVarName<"symbol">;
|
2019-02-08 22:37:54 +08:00
|
|
|
defm localize_symbols
|
|
|
|
: Eq<"localize-symbols",
|
|
|
|
"Reads a list of symbols from <filename> and marks them local.">,
|
|
|
|
MetaVarName<"filename">;
|
|
|
|
|
2019-08-15 12:45:41 +08:00
|
|
|
def L : JoinedOrSeparate<["-"], "L">,
|
|
|
|
Alias<localize_symbol>,
|
|
|
|
HelpText<"Alias for --localize-symbol">;
|
2018-08-18 06:34:48 +08:00
|
|
|
|
2018-11-02 05:38:14 +08:00
|
|
|
defm globalize_symbol : Eq<"globalize-symbol", "Mark <symbol> as global">,
|
|
|
|
MetaVarName<"symbol">;
|
2019-02-08 22:37:54 +08:00
|
|
|
|
|
|
|
defm globalize_symbols
|
|
|
|
: Eq<"globalize-symbols",
|
|
|
|
"Reads a list of symbols from <filename> and marks them global.">,
|
|
|
|
MetaVarName<"filename">;
|
|
|
|
|
2018-08-18 06:34:48 +08:00
|
|
|
defm keep_global_symbol
|
2018-11-02 05:38:14 +08:00
|
|
|
: Eq<"keep-global-symbol",
|
|
|
|
"Convert all symbols except <symbol> to local. May be repeated to "
|
|
|
|
"convert all except a set of symbols to local.">,
|
2018-11-02 01:20:40 +08:00
|
|
|
MetaVarName<"symbol">;
|
2019-08-15 12:45:41 +08:00
|
|
|
def G : JoinedOrSeparate<["-"], "G">,
|
|
|
|
Alias<keep_global_symbol>,
|
|
|
|
HelpText<"Alias for --keep-global-symbol">;
|
2018-08-18 06:34:48 +08:00
|
|
|
|
|
|
|
defm keep_global_symbols
|
2018-11-02 01:20:40 +08:00
|
|
|
: Eq<"keep-global-symbols",
|
|
|
|
"Reads a list of symbols from <filename> and runs as if "
|
2018-11-02 05:38:14 +08:00
|
|
|
"--keep-global-symbol=<symbol> is set for each one. <filename> "
|
|
|
|
"contains one symbol per line and may contain comments beginning with "
|
|
|
|
"'#'. Leading and trailing whitespace is stripped from each line. May "
|
|
|
|
"be repeated to read symbols from many files.">,
|
2018-11-02 01:20:40 +08:00
|
|
|
MetaVarName<"filename">;
|
2018-08-18 06:34:48 +08:00
|
|
|
|
2018-11-02 01:20:40 +08:00
|
|
|
defm weaken_symbol : Eq<"weaken-symbol", "Mark <symbol> as weak">,
|
2018-11-02 05:38:14 +08:00
|
|
|
MetaVarName<"symbol">;
|
2019-02-08 22:37:54 +08:00
|
|
|
defm weaken_symbols
|
|
|
|
: Eq<"weaken-symbols",
|
|
|
|
"Reads a list of symbols from <filename> and marks them weak.">,
|
|
|
|
MetaVarName<"filename">;
|
|
|
|
|
2019-08-15 12:45:41 +08:00
|
|
|
def W : JoinedOrSeparate<["-"], "W">,
|
|
|
|
Alias<weaken_symbol>,
|
|
|
|
HelpText<"Alias for --weaken-symbol">;
|
[llvm-objcopy] Accept --long-option but not -long-option
Summary:
llvm-{objcopy,strip} (and many other LLVM binary utilities) accept
cl::opt style -long-option as well as many short options (e.g. -p -S
-x). People who use them as replacement of GNU binutils often use the
grouped option syntax (POSIX Utility Conventions), e.g. -Sx => -S -x,
-Wd => -W -d, -sj.text => -s -j.text
There is ambiguity if a long option starts with the character used by a
short option. Drop the support for -long-option to resolve the ambiguity.
This divergence from other utilities is accepted (other utilities
continue supporting -long-option).
https://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html
Reviewers: alexshap, jakehehrlich, jhenderson, rupprecht, espindola
Reviewed By: jakehehrlich, jhenderson, rupprecht
Subscribers: grimar, emaste, arichardson, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60439
llvm-svn: 359265
2019-04-26 10:10:10 +08:00
|
|
|
def weaken : Flag<["--"], "weaken">,
|
2018-11-02 05:38:14 +08:00
|
|
|
HelpText<"Mark all global symbols as weak">;
|
[llvm-objcopy] Support -X|--discard-locals.
Summary:
This adds support for the --discard-locals flag, which acts similarly to --discard-all, except it only applies to compiler-generated symbols (i.e. symbols starting with `.L` in ELF).
I am not sure about COFF local symbols: those appear to also use `.L` in most cases, but also use just `L` in other cases, so for now I am just leaving it unimplemented there.
Fixes PR36160
Reviewers: jhenderson, alexshap, jakehehrlich, mstorsjo, espindola
Reviewed By: jhenderson
Subscribers: llvm-commits, emaste, arichardson
Differential Revision: https://reviews.llvm.org/D57248
llvm-svn: 352626
2019-01-30 22:58:13 +08:00
|
|
|
|
2019-02-08 22:37:54 +08:00
|
|
|
defm strip_symbols
|
|
|
|
: Eq<"strip-symbols",
|
|
|
|
"Reads a list of symbols from <filename> and removes them.">,
|
|
|
|
MetaVarName<"filename">;
|
|
|
|
|
2019-04-02 02:12:43 +08:00
|
|
|
defm keep_symbols
|
|
|
|
: Eq<"keep-symbols",
|
|
|
|
"Reads a list of symbols from <filename> and runs as if "
|
|
|
|
"--keep-symbol=<symbol> is set for each one. <filename> "
|
|
|
|
"contains one symbol per line and may contain comments beginning with "
|
|
|
|
"'#'. Leading and trailing whitespace is stripped from each line. May "
|
|
|
|
"be repeated to read symbols from many files.">,
|
|
|
|
MetaVarName<"filename">;
|
|
|
|
|
2018-11-02 05:38:14 +08:00
|
|
|
defm dump_section
|
|
|
|
: Eq<"dump-section",
|
|
|
|
"Dump contents of section named <section> into file <file>">,
|
|
|
|
MetaVarName<"section=file">;
|
|
|
|
defm prefix_symbols
|
|
|
|
: Eq<"prefix-symbols", "Add <prefix> to the start of every symbol name">,
|
|
|
|
MetaVarName<"prefix">;
|
|
|
|
|
2019-05-08 17:49:35 +08:00
|
|
|
defm prefix_alloc_sections
|
|
|
|
: Eq<"prefix-alloc-sections", "Add <prefix> to the start of every allocated section name">,
|
|
|
|
MetaVarName<"prefix">;
|
|
|
|
|
2018-12-04 03:49:23 +08:00
|
|
|
defm build_id_link_dir
|
|
|
|
: Eq<"build-id-link-dir", "Set directory for --build-id-link-input and "
|
|
|
|
"--build-id-link-output to <dir>">,
|
|
|
|
MetaVarName<"dir">;
|
|
|
|
defm build_id_link_input
|
|
|
|
: Eq<"build-id-link-input", "Hard-link the input to <dir>/xx/xxx<suffix> "
|
|
|
|
"name derived from hex build ID">,
|
|
|
|
MetaVarName<"suffix">;
|
|
|
|
defm build_id_link_output
|
|
|
|
: Eq<"build-id-link-output", "Hard-link the output to <dir>/xx/xxx<suffix> "
|
|
|
|
"name derived from hex build ID">,
|
|
|
|
MetaVarName<"suffix">;
|
2019-02-06 19:00:07 +08:00
|
|
|
|
2019-02-26 17:24:22 +08:00
|
|
|
defm set_start : Eq<"set-start", "Set the start address to <addr>. Overrides "
|
|
|
|
"any previous --change-start or --adjust-start values.">,
|
|
|
|
MetaVarName<"addr">;
|
|
|
|
defm change_start : Eq<"change-start", "Add <incr> to the start address. Can be "
|
|
|
|
"specified multiple times, all values will be applied "
|
|
|
|
"cumulatively.">,
|
|
|
|
MetaVarName<"incr">;
|
[llvm-objcopy] Accept --long-option but not -long-option
Summary:
llvm-{objcopy,strip} (and many other LLVM binary utilities) accept
cl::opt style -long-option as well as many short options (e.g. -p -S
-x). People who use them as replacement of GNU binutils often use the
grouped option syntax (POSIX Utility Conventions), e.g. -Sx => -S -x,
-Wd => -W -d, -sj.text => -s -j.text
There is ambiguity if a long option starts with the character used by a
short option. Drop the support for -long-option to resolve the ambiguity.
This divergence from other utilities is accepted (other utilities
continue supporting -long-option).
https://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html
Reviewers: alexshap, jakehehrlich, jhenderson, rupprecht, espindola
Reviewed By: jakehehrlich, jhenderson, rupprecht
Subscribers: grimar, emaste, arichardson, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60439
llvm-svn: 359265
2019-04-26 10:10:10 +08:00
|
|
|
def adjust_start : JoinedOrSeparate<["--"], "adjust-start">,
|
2019-08-15 12:45:41 +08:00
|
|
|
Alias<change_start>,
|
|
|
|
HelpText<"Alias for --change-start">;
|
2019-02-26 17:24:22 +08:00
|
|
|
|
2019-02-25 22:12:41 +08:00
|
|
|
defm add_symbol
|
|
|
|
: Eq<"add-symbol", "Add new symbol <name> to .symtab. Accepted flags: "
|
2019-08-15 17:45:09 +08:00
|
|
|
"global, local, weak, default, hidden, protected, file, section, object, "
|
2019-02-25 22:12:41 +08:00
|
|
|
"function, indirect-function. Accepted but ignored for "
|
|
|
|
"compatibility: debug, constructor, warning, indirect, synthetic, "
|
|
|
|
"unique-object, before.">,
|
|
|
|
MetaVarName<"name=[section:]value[,flags]">;
|