. . .nr rst2man-indent-level 0 . \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .rstReportMargin pre:
. RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .rstReportMargin post:
.. . RE indent \\n[an-margin]
old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1 new: \\n[rst2man-indent\\n[rst2man-indent-level]]
..
--add-gnu-debuglink <debug-file> Add a .gnu_debuglink section for <debug-file> to the output. NINDENT NDENT 0.0
--add-section <section=file> Add a section named <section> with the contents of <file> to the output. For ELF objects the section will be of type SHT_NOTE, if the name starts with \(dq.note\(dq. Otherwise, it will have type SHT_PROGBITS. Can be specified multiple times to add multiple sections. For MachO objects, <section> must be formatted as <segment name>,<section name>. NINDENT NDENT 0.0
--binary-architecture <arch>, -B Ignored for compatibility. NINDENT NDENT 0.0
--disable-deterministic-archives, -U Use real values for UIDs, GIDs and timestamps when updating archive member headers. NINDENT NDENT 0.0
--discard-all, -x Remove most local symbols from the output. Different file formats may limit this to a subset of the local symbols. For example, file and section symbols in ELF objects will not be discarded. Additionally, remove all debug sections. NINDENT NDENT 0.0
--dump-section <section>=<file> Dump the contents of section <section> into the file <file>. Can be specified multiple times to dump multiple sections to different files. <file> is unrelated to the input and output files provided to llvm-objcopy and as such the normal copying and editing operations will still be performed. No operations are performed on the sections prior to dumping them. For MachO objects, <section> must be formatted as <segment name>,<section name>. NINDENT NDENT 0.0
--enable-deterministic-archives, -D Enable deterministic mode when copying archives, i.e. use 0 for archive member header UIDs, GIDs and timestamp fields. On by default. NINDENT NDENT 0.0
--help, -h Print a summary of command line options. NINDENT NDENT 0.0
--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. NINDENT NDENT 0.0
--only-section <section>, -j Remove all sections from the output, except for sections named <section>. Can be specified multiple times to keep multiple sections. For MachO objects, <section> must be formatted as <segment name>,<section name>. NINDENT NDENT 0.0
--redefine-sym <old>=<new> Rename symbols called <old> to <new> in the output. Can be specified multiple times to rename multiple symbols. NINDENT NDENT 0.0
--redefine-syms <filename> Rename symbols in the output as described in the file <filename>. In the file, each line represents a single symbol to rename, with the old name and new name separated by whitespace. Leading and trailing whitespace is ignored, as is anything following a \(aq#\(aq. Can be specified multiple times to read names from multiple files. NINDENT NDENT 0.0
--regex If specified, symbol and section names specified by other switches are treated as extended POSIX regular expression patterns. NINDENT NDENT 0.0
--remove-section <section>, -R Remove the specified section from the output. Can be specified multiple times to remove multiple sections simultaneously. For MachO objects, <section> must be formatted as <segment name>,<section name>. NINDENT NDENT 0.0
--set-section-alignment <section>=<align> Set the alignment of section <section> to <align>. Can be specified multiple times to update multiple sections. NINDENT NDENT 0.0
--set-section-flags <section>=<flag>[,<flag>,...] Set section properties in the output of section <section> based on the specified <flag> values. Can be specified multiple times to update multiple sections. Supported flag names are alloc, load, noload, readonly, exclude, debug, code, data, rom, share, contents, merge and strings. Not all flags are meaningful for all object file formats. For ELF objects, the flags have the following effects: NDENT 7.0
--strip-all-gnu Remove all symbols, debug sections and relocations from the output. This option is equivalent to GNU objcopy\(aqs --strip-all switch. NINDENT NDENT 0.0
--strip-all, -S For ELF objects, remove from the output all symbols and non-alloc sections not within segments, except for .gnu.warning, .ARM.attribute sections and the section name table. For COFF and Mach-O objects, remove all symbols, debug sections, and relocations from the output. NINDENT NDENT 0.0
--strip-debug, -g Remove all debug sections from the output. NINDENT NDENT 0.0
--strip-symbol <symbol>, -N Remove all symbols named <symbol> from the output. Can be specified multiple times to remove multiple symbols. NINDENT NDENT 0.0
--strip-symbols <filename> Remove all symbols whose names appear in the file <filename>, from the output. In the file, each line represents a single symbol name, with leading and trailing whitespace ignored, as is anything following a \(aq#\(aq. Can be specified multiple times to read names from multiple files. NINDENT NDENT 0.0
--strip-unneeded-symbol <symbol> Remove from the output all symbols named <symbol> that are local or undefined and are not required by any relocation. NINDENT NDENT 0.0
--strip-unneeded-symbols <filename> Remove all symbols whose names appear in the file <filename>, from the output, if they are local or undefined and are not required by any relocation. In the file, each line represents a single symbol name, with leading and trailing whitespace ignored, as is anything following a \(aq#\(aq. Can be specified multiple times to read names from multiple files. NINDENT NDENT 0.0
--strip-unneeded Remove from the output all local or undefined symbols that are not required by relocations. Also remove all debug sections. NINDENT NDENT 0.0
--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. NINDENT NDENT 0.0
--version, -V Display the version of the llvm-objcopy executable. NINDENT NDENT 0.0
--wildcard, -w Allow wildcard syntax for symbol-related flags. On by default for section-related flags. Incompatible with --regex. Wildcard syntax allows the following special symbols:
Character |
Meaning |
Equivalent |
* |
Any number of characters |
.* |
? |
Any single character |
. |
\e |
Escape the next character |
\e |
[a-z] |
Character class |
[a-z] |
[!a-z], [^a-z] |
Negated character class |
[^a-z] |
@<FILE> Read command-line options and commands from response file <FILE>. NINDENT
--add-symbol <name>=[<section>:]<value>[,<flags>] Add a new symbol called <name> to the output symbol table, in the section named <section>, with value <value>. If <section> is not specified, the symbol is added as an absolute symbol. The <flags> affect the symbol properties. Accepted values are: NDENT 7.0
--allow-broken-links Allow llvm-objcopy to remove sections even if it would leave invalid section references. Any invalid sh_link fields will be set to zero. NINDENT NDENT 0.0
--change-start <incr>, --adjust-start Add <incr> to the program\(aqs start address. Can be specified multiple times, in which case the values will be applied cumulatively. NINDENT NDENT 0.0
--compress-debug-sections [<format>] Compress DWARF debug sections in the output, using the specified format. Supported formats are zlib and zstd. Use zlib if <format> is omitted. NINDENT NDENT 0.0
--decompress-debug-sections Decompress any compressed DWARF debug sections in the output. NINDENT NDENT 0.0
--discard-locals, -X Remove local symbols starting with \(dq.L\(dq from the output. NINDENT NDENT 0.0
--extract-dwo Remove all sections that are not DWARF .dwo sections from the output. NINDENT NDENT 0.0
--extract-main-partition Extract the main partition from the output. NINDENT NDENT 0.0
--extract-partition <name> Extract the named partition from the output. NINDENT NDENT 0.0
--globalize-symbol <symbol> Mark any defined symbols named <symbol> as global symbols in the output. Can be specified multiple times to mark multiple symbols. NINDENT NDENT 0.0
--globalize-symbols <filename> Read a list of names from the file <filename> and mark defined symbols with those names as global in the output. In the file, each line represents a single symbol, with leading and trailing whitespace ignored, as is anything following a \(aq#\(aq. Can be specified multiple times to read names from multiple files. NINDENT NDENT 0.0
--input-target <format>, -I Read the input as the specified format. See \%SUPPORTED FORMATS for a list of valid <format> values. If unspecified, llvm-objcopy will attempt to determine the format automatically. NINDENT NDENT 0.0
--keep-file-symbols Keep symbols of type STT_FILE, even if they would otherwise be stripped. NINDENT NDENT 0.0
--keep-global-symbol <symbol>, -G Make all symbols local in the output, except for symbols with the name <symbol>. Can be specified multiple times to ignore multiple symbols. NINDENT NDENT 0.0
--keep-global-symbols <filename> Make all symbols local in the output, except for symbols named in the file <filename>. In the file, each line represents a single symbol, with leading and trailing whitespace ignored, as is anything following a \(aq#\(aq. Can be specified multiple times to read names from multiple files. NINDENT NDENT 0.0
--keep-section <section> When removing sections from the output, do not remove sections named <section>. Can be specified multiple times to keep multiple sections. NINDENT NDENT 0.0
--keep-symbol <symbol>, -K When removing symbols from the output, do not remove symbols named <symbol>. Can be specified multiple times to keep multiple symbols. NINDENT NDENT 0.0
--keep-symbols <filename> When removing symbols from the output do not remove symbols named in the file <filename>. In the file, each line represents a single symbol, with leading and trailing whitespace ignored, as is anything following a \(aq#\(aq. Can be specified multiple times to read names from multiple files. NINDENT NDENT 0.0
--localize-hidden Make all symbols with hidden or internal visibility local in the output. NINDENT NDENT 0.0
--localize-symbol <symbol>, -L Mark any defined non-common symbol named <symbol> as a local symbol in the output. Can be specified multiple times to mark multiple symbols as local. NINDENT NDENT 0.0
--localize-symbols <filename> Read a list of names from the file <filename> and mark defined non-common symbols with those names as local in the output. In the file, each line represents a single symbol, with leading and trailing whitespace ignored, as is anything following a \(aq#\(aq. Can be specified multiple times to read names from multiple files. NINDENT NDENT 0.0
--new-symbol-visibility <visibility> Specify the visibility of the symbols automatically created when using binary input or \%--add-symbol. Valid options are: NDENT 7.0
--output-target <format>, -O Write the output as the specified format. See \%SUPPORTED FORMATS for a list of valid <format> values. If unspecified, the output format is assumed to be the same as the value specified for \%--input-target or the input file\(aqs format if that option is also unspecified. NINDENT NDENT 0.0
--prefix-alloc-sections <prefix> Add <prefix> to the front of the names of all allocatable sections in the output. NINDENT NDENT 0.0
--prefix-symbols <prefix> Add <prefix> to the front of every symbol name in the output. NINDENT NDENT 0.0
--preserve-dates, -p Preserve access and modification timestamps in the output. NINDENT NDENT 0.0
--rename-section <old>=<new>[,<flag>,...] Rename sections called <old> to <new> in the output, and apply any specified <flag> values. See \%--set-section-flags for a list of supported flags. Can be specified multiple times to rename multiple sections. NINDENT NDENT 0.0
--set-section-type <section>=<type> Set the type of section <section> to the integer <type>. Can be specified multiple times to update multiple sections. NINDENT NDENT 0.0
--set-start-addr <addr> Set the start address of the output to <addr>. Overrides any previously specified \%--change-start or \%--adjust-start options. NINDENT NDENT 0.0
--split-dwo <dwo-file> Equivalent to running llvm-objcopy with \%--extract-dwo and <dwo-file> as the output file and no other options, and then with \%--strip-dwo on the input file. NINDENT NDENT 0.0
--strip-dwo Remove all DWARF .dwo sections from the output. NINDENT NDENT 0.0
--strip-non-alloc Remove from the output all non-allocatable sections that are not within segments. NINDENT NDENT 0.0
--strip-sections Remove from the output all section headers and all section data not within segments. Note that many tools will not be able to use an object without section headers. NINDENT NDENT 0.0
--target <format>, -F Equivalent to \%--input-target and \%--output-target for the specified format. See \%SUPPORTED FORMATS for a list of valid <format> values. NINDENT NDENT 0.0
--weaken-symbol <symbol>, -W Mark any global symbol named <symbol> as a weak symbol in the output. Can be specified multiple times to mark multiple symbols as weak. NINDENT NDENT 0.0
--weaken-symbols <filename> Read a list of names from the file <filename> and mark global symbols with those names as weak in the output. In the file, each line represents a single symbol, with leading and trailing whitespace ignored, as is anything following a \(aq#\(aq. Can be specified multiple times to read names from multiple files. NINDENT NDENT 0.0
--weaken Mark all defined global symbols as weak in the output. NINDENT
--keep-undefined Keep undefined symbols, even if they would otherwise be stripped. NINDENT
--subsystem <name>[:<version>] Set the PE subsystem, and optionally subsystem version. NINDENT
.