OBJCOPY(1) | MidnightBSD General Commands Manual | OBJCOPY(1) |
objcopy
— copy and
translate object files
objcopy |
[-I objformat |
-s objformat |
--input-target= objformat]
[-K symbolname |
--keep-symbol= symbolname]
[-L symbolname |
--localize-symbol= symbolname]
[-N symbolname |
--strip-symbol= symbolname]
[-O objformat |
--output-target= objformat]
[-R sectionname |
--remove-section= sectionname]
[-S | --strip-all ]
[-V | --version ]
[-W symbolname |
--weaken-symbol= symbolname]
[-X | --discard-locals ]
[-d | -g |
--strip-debug ] [-h |
--help ] [-j
sectionname |
--only-section= sectionname]
[-p | --preserve-dates ]
[-w | --wildcard ]
[-x | --discard-all ]
[--add-gnu-debuglink =filename]
[--add-section
sectionname=filename]
[--adjust-section-vma
section{+|-|=}val |
--change-section-address
section{+|-|=}val]
[--adjust-start =increment |
--change-start =increment]
[--adjust-vma =increment |
--change-addresses =increment]
[--adjust-warnings |
--change-warnings ]
[--change-section-lma
section{+|-|=}val]
[--change-section-vma
section{+|-|=}val]
[--extract-dwo ]
[--gap-fill =val]
[--globalize-symbol =ar symbolname]
[--globalize-symbols =filename]
[--localize-hidden ]
[--localize-symbols =filename]
[--no-adjust-warnings |
--no-change-warnings ]
[--only-keep-debug ]
[--pad-to =address]
[--prefix-alloc-sections =string]
[--prefix-sections =string]
[--prefix-symbols =string]
[--rename-section
oldname=newname[,flags]]
[--set-section-flags
sectionname=flags]
[--set-start =address]
[--srec-forceS3 ]
[--srec-len =val]
[--strip-dwo ]
[--strip-symbols= filename]
[--strip-unneeded ] infile
[outfile] |
The objcopy
utility copies the content of
the binary object named by argument infile to that
named by argument outfile, transforming it according
to the command line options specified. If argument
outfile is not specified,
objcopy
will create a temporary file and will
subsequently rename it as infile.
The objcopy
utility supports the following
options:
-I
objformat |
-s
objformat |
--input-target=
objformat-K
symbolname |
--keep-symbol=
symbolname-L
symbolname |
--localize-symbol=
symbolname-N
symbol |
--strip-symbol=
symbolname-O
objformat |
--output-target=
objformat-R
sectionname |
--remove-section=
sectionname-S
|
--strip-all
-V
|
--version
-W
symbolname |
--weaken-symbol=
symbolname-X
|
--discard-locals
-d
|
-g
|
--strip-debug
-h
|
--help
-j
sectionname |
--only-section=
sectionname-p
|
--preserve-dates
-w
|
--wildcard
*
\
-x
|
--discard-all
--add-gnu-debuglink
=filename--add-section
sectionname=filename--adjust-section-vma
section{+|-|=}val |
--change-section-address
section{+|-|=}val--adjust-start
=increment
|
--change-start
=increment--adjust-vma
=increment
|
--change-addresses
=increment--adjust-warnings
|
--change-warnings
--change-section-address
,
--change-section-lma
or
--change-section-vma
does not exist in the input
object. This is the default.--change-section-lma
section{+|-|=}val--change-section-vma
section{+|-|=}val--extract-dwo
--gap-fill
=val--globalize-symbol
=symbolname--globalize-symbols
=filename--localize-symbols
=filename--no-adjust-warnings
|
--no-change-warnings
--change-section-address
,
--change-section-lma
or
--change-section-vma
is missing in the input
object.--only-keep-debug
--pad-to
=address--prefix-alloc-sections
=string--prefix-sections
=string--prefix-symbols
=string--rename-section
oldname=newname[,flags]--set-section-flags
below.--set-section-flags
sectionname=flags--set-start
=address--srec-forceS3
--srec-len
=val--strip-dwo
--strip-symbols=
filename--strip-unneeded
The objcopy
utility exits 0 on
success, and >0 if an error occurs.
ar(1), ld(1), mcs(1), strip(1), elf(3), elftc_bfd_find_target(3), ar(5), elf(5)
The objcopy
utility is expected to be
option compatible with GNU objcopy
.
objcopy
has been implemented by
Kai Wang
<kaiwang27@users.sourceforge.net>.
August 30, 2017 | midnightbsd-3.1 |