Usage: /usr/arm-none-eabi/bin/objcopy [option(s)] in-file [out-file]
Copies a binary file, possibly transforming it in the process
The options are:
-I --input-target <bfdname> Assume input file is in format <bfdname>
-O --output-target <bfdname> Create an output file in format <bfdname>
-B --binary-architecture <arch> Set output arch, when input is arch-less
-F --target <bfdname> Set both input and output format to <bfdname>
--debugging Convert debugging information, if possible
-p --preserve-dates Copy modified/access timestamps to the output
-D --enable-deterministic-archives
Produce deterministic output when stripping archives (default)
-U --disable-deterministic-archives
Disable -D behavior
-j --only-section <name> Only copy section <name> into the output
--add-gnu-debuglink=<file> Add section .gnu_debuglink linking to <file>
-R --remove-section <name> Remove section <name> from the output
--remove-relocations <name> Remove relocations from section <name>
--strip-section-headers Strip section header from the output
-S --strip-all Remove all symbol and relocation information
-g --strip-debug Remove all debugging symbols & sections
--strip-dwo Remove all DWO sections
--strip-unneeded Remove all symbols not needed by relocations
-N --strip-symbol <name> Do not copy symbol <name>
--strip-unneeded-symbol <name>
Do not copy symbol <name> unless needed by
relocations
--only-keep-debug Strip everything but the debug information
--extract-dwo Copy only DWO sections
--extract-symbol Remove section contents but keep symbols
--keep-section <name> Do not strip section <name>
-K --keep-symbol <name> Do not strip symbol <name>
--keep-section-symbols Do not strip section symbols
--keep-file-symbols Do not strip file symbol(s)
--localize-hidden Turn all ELF hidden symbols into locals
-L --localize-symbol <name> Force symbol <name> to be marked as a local
--globalize-symbol <name> Force symbol <name> to be marked as a global
-G --keep-global-symbol <name> Localize all symbols except <name>
-W --weaken-symbol <name> Force symbol <name> to be marked as a weak
--weaken Force all global symbols to be marked as weak
-w --wildcard Permit wildcard in symbol comparison
-x --discard-all Remove all non-global symbols
-X --discard-locals Remove any compiler-generated symbols
-i --interleave[=<number>] Only copy N out of every <number> bytes
--interleave-width <number> Set N for --interleave
-b --byte <num> Select byte <num> in every interleaved block
--gap-fill <val> Fill gaps between sections with <val>
--pad-to <addr> Pad the last section up to address <addr>
--set-start <addr> Set the start address to <addr>
{--change-start|--adjust-start} <incr>
Add <incr> to the start address
{--change-addresses|--adjust-vma} <incr>
Add <incr> to LMA, VMA and start addresses
{--change-section-address|--adjust-section-vma} <name>{=|+|-}<val>
Change LMA and VMA of section <name> by <val>
--change-section-lma <name>{=|+|-}<val>
Change the LMA of section <name> by <val>
--change-section-vma <name>{=|+|-}<val>
Change the VMA of section <name> by <val>
{--[no-]change-warnings|--[no-]adjust-warnings}
Warn if a named section does not exist
--set-section-flags <name>=<flags>
Set section <name>'s properties to <flags>
--set-section-alignment <name>=<align>
Set section <name>'s alignment to <align> bytes
--add-section <name>=<file> Add section <name> found in <file> to output
--update-section <name>=<file>
Update contents of section <name> with
contents found in <file>
--dump-section <name>=<file> Dump the contents of section <name> into <file>
--rename-section <old>=<new>[,<flags>] Rename section <old> to <new>
--long-section-names {enable|disable|keep}
Handle long section names in Coff objects.
--change-leading-char Force output format's leading character style
--remove-leading-char Remove leading character from global symbols
--reverse-bytes=<num> Reverse <num> bytes at a time, in output sections with content
--redefine-sym <old>=<new> Redefine symbol name <old> to <new>
--redefine-syms <file> --redefine-sym for all symbol pairs
listed in <file>
--srec-len <number> Restrict the length of generated Srecords
--srec-forceS3 Restrict the type of generated Srecords to S3
--strip-symbols <file> -N for all symbols listed in <file>
--strip-unneeded-symbols <file>
--strip-unneeded-symbol for all symbols listed
in <file>
--keep-symbols <file> -K for all symbols listed in <file>
--localize-symbols <file> -L for all symbols listed in <file>
--globalize-symbols <file> --globalize-symbol for all in <file>
--keep-global-symbols <file> -G for all symbols listed in <file>
--weaken-symbols <file> -W for all symbols listed in <file>
--binary-symbol-prefix <prefix>
Use <prefix> as the base symbol name for the input file
(default: derived from file name)
--add-symbol <name>=[<section>:]<value>[,<flags>] Add a symbol
--alt-machine-code <index> Use the target's <index>'th alternative machine
--writable-text Mark the output text as writable
--readonly-text Make the output text write protected
--pure Mark the output file as demand paged
--impure Mark the output file as impure
--prefix-symbols <prefix> Add <prefix> to start of every symbol name
--prefix-sections <prefix> Add <prefix> to start of every section name
--prefix-alloc-sections <prefix>
Add <prefix> to start of every allocatable
section name
--file-alignment <num> Set PE file alignment to <num>
--heap <reserve>[,<commit>] Set PE reserve/commit heap to <reserve>/
<commit>
--image-base <address> Set PE image base to <address>
--section-alignment <num> Set PE section alignment to <num>
--stack <reserve>[,<commit>] Set PE reserve/commit stack to <reserve>/
<commit>
--subsystem <name>[:<version>]
Set PE subsystem to <name> [& <version>]
--compress-debug-sections[={none|zlib|zlib-gnu|zlib-gabi|zstd}]
Compress DWARF debug sections
--decompress-debug-sections Decompress DWARF debug sections using zlib
--elf-stt-common=[yes|no] Generate ELF common symbols with STT_COMMON
type
--verilog-data-width <number> Specifies data width, in bytes, for verilog output
-M --merge-notes Remove redundant entries in note sections
--no-merge-notes Do not attempt to remove redundant notes (default)
-v --verbose List all object files modified
@<file> Read options from <file>
-V --version Display this program's version number
-h --help Display this output
--info List object formats & architectures supported
/usr/arm-none-eabi/bin/objcopy: supported targets: elf32-littlearm elf32-littlearm-fdpic elf32-bigarm elf32-bigarm-fdpic elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex plugin
Report bugs to <https://sourceware.org/bugzilla/>
Options (88)
| Option | Description | Source |
|---|---|---|
-I --input-target | Assume input file is in format <bfdname> | help |
-O --output-target | Create an output file in format <bfdname> | help |
-B --binary-architecture | Set output arch, when input is arch-less | help |
-F --target | Set both input and output format to <bfdname> | help |
--debugging | Convert debugging information, if possible | help |
-p --preserve-dates | Copy modified/access timestamps to the output | help |
-D --enable-deterministic-archives | Produce deterministic output when stripping archives (default) | help |
-U --disable-deterministic-archives | Disable -D behavior | help |
-j --only-section | Only copy section <name> into the output | help |
--add-gnu-debuglink file | Add section .gnu_debuglink linking to <file> | help |
-R --remove-section | Remove section <name> from the output | help |
--remove-relocations name | Remove relocations from section <name> | help |
--strip-section-headers | Strip section header from the output | help |
-S --strip-all | Remove all symbol and relocation information | help |
-g --strip-debug | Remove all debugging symbols & sections | help |
--strip-dwo | Remove all DWO sections | help |
--strip-unneeded | Remove all symbols not needed by relocations | help |
-N --strip-symbol | Do not copy symbol <name> | help |
--strip-unneeded-symbol name | Do not copy symbol <name> unless needed by relocations | help |
--only-keep-debug | Strip everything but the debug information | help |
--extract-dwo | Copy only DWO sections | help |
--extract-symbol | Remove section contents but keep symbols | help |
--keep-section name | Do not strip section <name> | help |
-K --keep-symbol | Do not strip symbol <name> | help |
--keep-section-symbols | Do not strip section symbols | help |
--keep-file-symbols | Do not strip file symbol(s) | help |
--localize-hidden | Turn all ELF hidden symbols into locals | help |
-L --localize-symbol | Force symbol <name> to be marked as a local | help |
--globalize-symbol name | Force symbol <name> to be marked as a global | help |
-G --keep-global-symbol | Localize all symbols except <name> | help |
-W --weaken-symbol | Force symbol <name> to be marked as a weak | help |
--weaken | Force all global symbols to be marked as weak | help |
-w --wildcard | Permit wildcard in symbol comparison | help |
-x --discard-all | Remove all non-global symbols | help |
-X --discard-locals | Remove any compiler-generated symbols | help |
-i --interleave[=<number | Only copy N out of every <number> bytes | help |
--interleave-width number | Set N for --interleave | help |
-b --byte | Select byte <num> in every interleaved block | help |
--gap-fill val | Fill gaps between sections with <val> | help |
--pad-to addr | Pad the last section up to address <addr> | help |
--set-start addr | Set the start address to <addr> | help |
--change-section-lma name>{=|+|-}<val | Change the LMA of section <name> by <val> | help |
--change-section-vma name>{=|+|-}<val | Change the VMA of section <name> by <val> | help |
--set-section-flags name>=<flags | Set section <name>'s properties to <flags> | help |
--set-section-alignment name>=<align | Set section <name>'s alignment to <align> bytes | help |
--add-section name>=<file | Add section <name> found in <file> to output | help |
--update-section name>=<file | Update contents of section <name> with contents found in <file> | help |
--dump-section name>=<file | Dump the contents of section <name> into <file> | help |
--long-section-names enable|disable|keep | Handle long section names in Coff objects. | help |
--change-leading-char | Force output format's leading character style | help |
--remove-leading-char | Remove leading character from global symbols | help |
--reverse-bytes num | Reverse <num> bytes at a time, in output sections with content | help |
--redefine-sym old>=<new | Redefine symbol name <old> to <new> | help |
--redefine-syms file | --redefine-sym for all symbol pairs listed in <file> | help |
--srec-len number | Restrict the length of generated Srecords | help |
--srec-forceS3 | Restrict the type of generated Srecords to S3 | help |
--strip-symbols file | -N for all symbols listed in <file> | help |
--strip-unneeded-symbols file | help | |
--keep-symbols file | -K for all symbols listed in <file> | help |
--localize-symbols file | -L for all symbols listed in <file> | help |
--globalize-symbols file | --globalize-symbol for all in <file> | help |
--keep-global-symbols file | -G for all symbols listed in <file> | help |
--weaken-symbols file | -W for all symbols listed in <file> | help |
--binary-symbol-prefix prefix | Use <prefix> as the base symbol name for the input file (default: derived from file name) | help |
--add-symbol name>=[<section>:]<value | Add a symbol | help |
--alt-machine-code index | Use the target's <index>'th alternative machine | help |
--writable-text | Mark the output text as writable | help |
--readonly-text | Make the output text write protected | help |
--pure | Mark the output file as demand paged | help |
--impure | Mark the output file as impure | help |
--prefix-symbols prefix | Add <prefix> to start of every symbol name | help |
--prefix-sections prefix | Add <prefix> to start of every section name | help |
--prefix-alloc-sections prefix | Add <prefix> to start of every allocatable section name | help |
--file-alignment num | Set PE file alignment to <num> | help |
--heap reserve | Set PE reserve/commit heap to <reserve>/ <commit> | help |
--image-base address | Set PE image base to <address> | help |
--section-alignment num | Set PE section alignment to <num> | help |
--stack reserve | Set PE reserve/commit stack to <reserve>/ <commit> | help |
--subsystem name>[:<version | Set PE subsystem to <name> [& <version>] | help |
--compress-debug-sections none|zlib|zlib-gnu|zlib-gabi|zstd | Compress DWARF debug sections | help |
--decompress-debug-sections | Decompress DWARF debug sections using zlib | help |
--elf-stt-common yes|no | Generate ELF common symbols with STT_COMMON type | help |
-M | --merge-notes Remove redundant entries in note sections | help |
--no-merge-notes | Do not attempt to remove redundant notes (default) | help |
-v --verbose | List all object files modified | help |
-V --version | Display this program's version number | help |
-h --help | Display this output | help |
--info | List object formats & architectures supported | help |