mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
549 lines
25 KiB
Groff
549 lines
25 KiB
Groff
.\" Automatically generated by Pod::Man version 1.02
|
|
.\" Wed May 30 12:24:28 2001
|
|
.\"
|
|
.\" Standard preamble:
|
|
.\" ======================================================================
|
|
.de Sh \" Subsection heading
|
|
.br
|
|
.if t .Sp
|
|
.ne 5
|
|
.PP
|
|
\fB\\$1\fR
|
|
.PP
|
|
..
|
|
.de Sp \" Vertical space (when we can't use .PP)
|
|
.if t .sp .5v
|
|
.if n .sp
|
|
..
|
|
.de Ip \" List item
|
|
.br
|
|
.ie \\n(.$>=3 .ne \\$3
|
|
.el .ne 3
|
|
.IP "\\$1" \\$2
|
|
..
|
|
.de Vb \" Begin verbatim text
|
|
.ft CW
|
|
.nf
|
|
.ne \\$1
|
|
..
|
|
.de Ve \" End verbatim text
|
|
.ft R
|
|
|
|
.fi
|
|
..
|
|
.\" Set up some character translations and predefined strings. \*(-- will
|
|
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
|
.\" double quote, and \*(R" will give a right double quote. | will give a
|
|
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used
|
|
.\" to do unbreakable dashes and therefore won't be available. \*(C` and
|
|
.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
|
|
.tr \(*W-|\(bv\*(Tr
|
|
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
|
.ie n \{\
|
|
. ds -- \(*W-
|
|
. ds PI pi
|
|
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
|
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
|
. ds L" ""
|
|
. ds R" ""
|
|
. ds C` `
|
|
. ds C' '
|
|
'br\}
|
|
.el\{\
|
|
. ds -- \|\(em\|
|
|
. ds PI \(*p
|
|
. ds L" ``
|
|
. ds R" ''
|
|
'br\}
|
|
.\"
|
|
.\" If the F register is turned on, we'll generate index entries on stderr
|
|
.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
|
|
.\" index entries marked with X<> in POD. Of course, you'll have to process
|
|
.\" the output yourself in some meaningful fashion.
|
|
.if \nF \{\
|
|
. de IX
|
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
|
. .
|
|
. nr % 0
|
|
. rr F
|
|
.\}
|
|
.\"
|
|
.\" For nroff, turn off justification. Always turn off hyphenation; it
|
|
.\" makes way too many mistakes in technical documents.
|
|
.hy 0
|
|
.\"
|
|
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
|
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
|
.bd B 3
|
|
. \" fudge factors for nroff and troff
|
|
.if n \{\
|
|
. ds #H 0
|
|
. ds #V .8m
|
|
. ds #F .3m
|
|
. ds #[ \f1
|
|
. ds #] \fP
|
|
.\}
|
|
.if t \{\
|
|
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
|
. ds #V .6m
|
|
. ds #F 0
|
|
. ds #[ \&
|
|
. ds #] \&
|
|
.\}
|
|
. \" simple accents for nroff and troff
|
|
.if n \{\
|
|
. ds ' \&
|
|
. ds ` \&
|
|
. ds ^ \&
|
|
. ds , \&
|
|
. ds ~ ~
|
|
. ds /
|
|
.\}
|
|
.if t \{\
|
|
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
|
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
|
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
|
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
|
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
|
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
|
.\}
|
|
. \" troff and (daisy-wheel) nroff accents
|
|
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
|
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
|
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
|
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
|
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
|
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
|
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
|
.ds ae a\h'-(\w'a'u*4/10)'e
|
|
.ds Ae A\h'-(\w'A'u*4/10)'E
|
|
. \" corrections for vroff
|
|
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
|
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
|
. \" for low resolution devices (crt and lpr)
|
|
.if \n(.H>23 .if \n(.V>19 \
|
|
\{\
|
|
. ds : e
|
|
. ds 8 ss
|
|
. ds o a
|
|
. ds d- d\h'-1'\(ga
|
|
. ds D- D\h'-1'\(hy
|
|
. ds th \o'bp'
|
|
. ds Th \o'LP'
|
|
. ds ae ae
|
|
. ds Ae AE
|
|
.\}
|
|
.rm #[ #] #H #V #F C
|
|
.\" ======================================================================
|
|
.\"
|
|
.IX Title "OBJCOPY.1 1"
|
|
.TH OBJCOPY.1 1 "binutils-2.11.90" "2001-05-30" "GNU"
|
|
.UC
|
|
.SH "NAME"
|
|
objcopy \- copy and translate object files
|
|
.SH "SYNOPSIS"
|
|
.IX Header "SYNOPSIS"
|
|
objcopy [ \-F \fIbfdname\fR | \-\-target=\fIbfdname\fR ]
|
|
[ \-I \fIbfdname\fR | \-\-input-target=\fIbfdname\fR ]
|
|
[ \-O \fIbfdname\fR | \-\-output-target=\fIbfdname\fR ]
|
|
[ \-B \fIbfdarch\fR | \-\-binary-architecture=\fIbfdarch\fR ]
|
|
[ \-S | \-\-strip-all ] [ \-g | \-\-strip-debug ]
|
|
[ \-K \fIsymbolname\fR | \-\-keep-symbol=\fIsymbolname\fR ]
|
|
[ \-N \fIsymbolname\fR | \-\-strip-symbol=\fIsymbolname\fR ]
|
|
[ \-G \fIsymbolname\fR | \-\-keep-global-symbol=\fIsymbolname\fR]
|
|
[ \-L \fIsymbolname\fR | \-\-localize-symbol=\fIsymbolname\fR ]
|
|
[ \-W \fIsymbolname\fR | \-\-weaken-symbol=\fIsymbolname\fR ]
|
|
[ \-x | \-\-discard-all ] [ \-X | \-\-discard-locals ]
|
|
[ \-b \fIbyte\fR | \-\-byte=\fIbyte\fR ]
|
|
[ \-i \fIinterleave\fR | \-\-interleave=\fIinterleave\fR ]
|
|
[ \-j \fIsectionname\fR | \-\-only-section=\fIsectionname\fR ]
|
|
[ \-R \fIsectionname\fR | \-\-remove-section=\fIsectionname\fR ]
|
|
[ \-p | \-\-preserve-dates ] [ \-\-debugging ]
|
|
[ \-\-gap-fill=\fIval\fR ] [ \-\-pad-to=\fIaddress\fR ]
|
|
[ \-\-set-start=\fIval\fR ] [ \-\-adjust-start=\fIincr\fR ]
|
|
[ \-\-change-addresses=\fIincr\fR ]
|
|
[ \-\-change-section-address \fIsection\fR{=,+,\-}\fIval\fR ]
|
|
[ \-\-change-section-lma \fIsection\fR{=,+,\-}\fIval\fR ]
|
|
[ \-\-change-section-vma \fIsection\fR{=,+,\-}\fIval\fR ]
|
|
[ \-\-change-warnings ] [ \-\-no-change-warnings ]
|
|
[ \-\-set-section-flags \fIsection\fR=\fIflags\fR ]
|
|
[ \-\-add-section \fIsectionname\fR=\fIfilename\fR ]
|
|
[ \-\-change-leading-char ] [ \-\-remove-leading-char ]
|
|
[ \-\-srec-len=\fIival\fR ] [ \-\-srec-forceS3 ]
|
|
[ \-\-redefine-sym \fIold\fR=\fInew\fR ] [ \-\-weaken ]
|
|
[ \-\-keep-symbols=\fIfilename\fR ]
|
|
[ \-\-strip-symbols=\fIfilename\fR ]
|
|
[ \-\-keep-global-symbols=\fIfilename\fR ]
|
|
[ \-\-localize-symbols=\fIfilename\fR ]
|
|
[ \-\-weaken-symbols=\fIfilename\fR ]
|
|
[ \-v | \-\-verbose ] [ \-V | \-\-version ] [ \-\-help ]
|
|
\fIinfile\fR [\fIoutfile\fR]
|
|
.SH "DESCRIPTION"
|
|
.IX Header "DESCRIPTION"
|
|
The \s-1GNU\s0 \f(CW\*(C`objcopy\*(C'\fR utility copies the contents of an object
|
|
file to another. \f(CW\*(C`objcopy\*(C'\fR uses the \s-1GNU\s0 \s-1BFD\s0 Library to
|
|
read and write the object files. It can write the destination object
|
|
file in a format different from that of the source object file. The
|
|
exact behavior of \f(CW\*(C`objcopy\*(C'\fR is controlled by command-line options.
|
|
Note that \f(CW\*(C`objcopy\*(C'\fR should be able to copy a fully linked file
|
|
between any two formats. However, copying a relocatable object file
|
|
between any two formats may not work as expected.
|
|
.PP
|
|
\&\f(CW\*(C`objcopy\*(C'\fR creates temporary files to do its translations and
|
|
deletes them afterward. \f(CW\*(C`objcopy\*(C'\fR uses \s-1BFD\s0 to do all its
|
|
translation work; it has access to all the formats described in \s-1BFD\s0
|
|
and thus is able to recognize most formats without being told
|
|
explicitly.
|
|
.PP
|
|
\&\f(CW\*(C`objcopy\*(C'\fR can be used to generate S-records by using an output
|
|
target of \fBsrec\fR (e.g., use \fB\-O srec\fR).
|
|
.PP
|
|
\&\f(CW\*(C`objcopy\*(C'\fR can be used to generate a raw binary file by using an
|
|
output target of \fBbinary\fR (e.g., use \fB\-O binary\fR). When
|
|
\&\f(CW\*(C`objcopy\*(C'\fR generates a raw binary file, it will essentially produce
|
|
a memory dump of the contents of the input object file. All symbols and
|
|
relocation information will be discarded. The memory dump will start at
|
|
the load address of the lowest section copied into the output file.
|
|
.PP
|
|
When generating an S-record or a raw binary file, it may be helpful to
|
|
use \fB\-S\fR to remove sections containing debugging information. In
|
|
some cases \fB\-R\fR will be useful to remove sections which contain
|
|
information that is not needed by the binary file.
|
|
.PP
|
|
Note \- \f(CW\*(C`objcopy\*(C'\fR is not able to change the endianness of its input
|
|
files. If the input format has an endianness, (some formats do not),
|
|
\&\f(CW\*(C`objcopy\*(C'\fR can only copy the inputs into file formats that have the
|
|
same endianness or which have no endianness (eg \fBsrec\fR).
|
|
.SH "OPTIONS"
|
|
.IX Header "OPTIONS"
|
|
.Ip "\f(CW\*(C`\f(CIinfile\f(CW\*(C'\fR" 4
|
|
.IX Item "infile"
|
|
.Ip "\f(CW\*(C`\f(CIoutfile\f(CW\*(C'\fR" 4
|
|
.IX Item "outfile"
|
|
The input and output files, respectively.
|
|
If you do not specify \fIoutfile\fR, \f(CW\*(C`objcopy\*(C'\fR creates a
|
|
temporary file and destructively renames the result with
|
|
the name of \fIinfile\fR.
|
|
.Ip "\f(CW\*(C`\-I \f(CIbfdname\f(CW \*(C'\fR" 4
|
|
.IX Item "-I bfdname "
|
|
.Ip "\f(CW\*(C`\-\-input\-target=\f(CIbfdname\f(CW\*(C'\fR" 4
|
|
.IX Item "--input-target=bfdname"
|
|
Consider the source file's object format to be \fIbfdname\fR, rather than
|
|
attempting to deduce it.
|
|
.Ip "\f(CW\*(C`\-O \f(CIbfdname\f(CW\*(C'\fR" 4
|
|
.IX Item "-O bfdname"
|
|
.Ip "\f(CW\*(C`\-\-output\-target=\f(CIbfdname\f(CW\*(C'\fR" 4
|
|
.IX Item "--output-target=bfdname"
|
|
Write the output file using the object format \fIbfdname\fR.
|
|
.Ip "\f(CW\*(C`\-F \f(CIbfdname\f(CW\*(C'\fR" 4
|
|
.IX Item "-F bfdname"
|
|
.Ip "\f(CW\*(C`\-\-target=\f(CIbfdname\f(CW\*(C'\fR" 4
|
|
.IX Item "--target=bfdname"
|
|
Use \fIbfdname\fR as the object format for both the input and the output
|
|
file; i.e., simply transfer data from source to destination with no
|
|
translation.
|
|
.Ip "\f(CW\*(C`\-B \f(CIbfdarch\f(CW\*(C'\fR" 4
|
|
.IX Item "-B bfdarch"
|
|
.Ip "\f(CW\*(C`\-\-binary\-architecture=\f(CIbfdarch\f(CW\*(C'\fR" 4
|
|
.IX Item "--binary-architecture=bfdarch"
|
|
Useful when transforming a raw binary input file into an object file.
|
|
In this case the output architecture can be set to \fIbfdarch\fR. This
|
|
option will be ignored if the input file has a known \fIbfdarch\fR. You
|
|
can access this binary data inside a program by referencing the special
|
|
symbols that are created by the conversion process. These symbols are
|
|
called _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and
|
|
_binary_\fIobjfile\fR_size. e.g. you can transform a picture file into
|
|
an object file and then access it in your code using these symbols.
|
|
.Ip "\f(CW\*(C`\-j \f(CIsectionname\f(CW\*(C'\fR" 4
|
|
.IX Item "-j sectionname"
|
|
.Ip "\f(CW\*(C`\-\-only\-section=\f(CIsectionname\f(CW\*(C'\fR" 4
|
|
.IX Item "--only-section=sectionname"
|
|
Copy only the named section from the input file to the output file.
|
|
This option may be given more than once. Note that using this option
|
|
inappropriately may make the output file unusable.
|
|
.Ip "\f(CW\*(C`\-R \f(CIsectionname\f(CW\*(C'\fR" 4
|
|
.IX Item "-R sectionname"
|
|
.Ip "\f(CW\*(C`\-\-remove\-section=\f(CIsectionname\f(CW\*(C'\fR" 4
|
|
.IX Item "--remove-section=sectionname"
|
|
Remove any section named \fIsectionname\fR from the output file. This
|
|
option may be given more than once. Note that using this option
|
|
inappropriately may make the output file unusable.
|
|
.Ip "\f(CW\*(C`\-S\*(C'\fR" 4
|
|
.IX Item "-S"
|
|
.Ip "\f(CW\*(C`\-\-strip\-all\*(C'\fR" 4
|
|
.IX Item "--strip-all"
|
|
Do not copy relocation and symbol information from the source file.
|
|
.Ip "\f(CW\*(C`\-g\*(C'\fR" 4
|
|
.IX Item "-g"
|
|
.Ip "\f(CW\*(C`\-\-strip\-debug\*(C'\fR" 4
|
|
.IX Item "--strip-debug"
|
|
Do not copy debugging symbols from the source file.
|
|
.Ip "\f(CW\*(C`\-\-strip\-unneeded\*(C'\fR" 4
|
|
.IX Item "--strip-unneeded"
|
|
Strip all symbols that are not needed for relocation processing.
|
|
.Ip "\f(CW\*(C`\-K \f(CIsymbolname\f(CW\*(C'\fR" 4
|
|
.IX Item "-K symbolname"
|
|
.Ip "\f(CW\*(C`\-\-keep\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4
|
|
.IX Item "--keep-symbol=symbolname"
|
|
Copy only symbol \fIsymbolname\fR from the source file. This option may
|
|
be given more than once.
|
|
.Ip "\f(CW\*(C`\-N \f(CIsymbolname\f(CW\*(C'\fR" 4
|
|
.IX Item "-N symbolname"
|
|
.Ip "\f(CW\*(C`\-\-strip\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4
|
|
.IX Item "--strip-symbol=symbolname"
|
|
Do not copy symbol \fIsymbolname\fR from the source file. This option
|
|
may be given more than once.
|
|
.Ip "\f(CW\*(C`\-G \f(CIsymbolname\f(CW\*(C'\fR" 4
|
|
.IX Item "-G symbolname"
|
|
.Ip "\f(CW\*(C`\-\-keep\-global\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4
|
|
.IX Item "--keep-global-symbol=symbolname"
|
|
Keep only symbol \fIsymbolname\fR global. Make all other symbols local
|
|
to the file, so that they are not visible externally. This option may
|
|
be given more than once.
|
|
.Ip "\f(CW\*(C`\-L \f(CIsymbolname\f(CW\*(C'\fR" 4
|
|
.IX Item "-L symbolname"
|
|
.Ip "\f(CW\*(C`\-\-localize\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4
|
|
.IX Item "--localize-symbol=symbolname"
|
|
Make symbol \fIsymbolname\fR local to the file, so that it is not
|
|
visible externally. This option may be given more than once.
|
|
.Ip "\f(CW\*(C`\-W \f(CIsymbolname\f(CW\*(C'\fR" 4
|
|
.IX Item "-W symbolname"
|
|
.Ip "\f(CW\*(C`\-\-weaken\-symbol=\f(CIsymbolname\f(CW\*(C'\fR" 4
|
|
.IX Item "--weaken-symbol=symbolname"
|
|
Make symbol \fIsymbolname\fR weak. This option may be given more than once.
|
|
.Ip "\f(CW\*(C`\-x\*(C'\fR" 4
|
|
.IX Item "-x"
|
|
.Ip "\f(CW\*(C`\-\-discard\-all\*(C'\fR" 4
|
|
.IX Item "--discard-all"
|
|
Do not copy non-global symbols from the source file.
|
|
.Ip "\f(CW\*(C`\-X\*(C'\fR" 4
|
|
.IX Item "-X"
|
|
.Ip "\f(CW\*(C`\-\-discard\-locals\*(C'\fR" 4
|
|
.IX Item "--discard-locals"
|
|
Do not copy compiler-generated local symbols.
|
|
(These usually start with \fBL\fR or \fB.\fR.)
|
|
.Ip "\f(CW\*(C`\-b \f(CIbyte\f(CW\*(C'\fR" 4
|
|
.IX Item "-b byte"
|
|
.Ip "\f(CW\*(C`\-\-byte=\f(CIbyte\f(CW\*(C'\fR" 4
|
|
.IX Item "--byte=byte"
|
|
Keep only every \fIbyte\fRth byte of the input file (header data is not
|
|
affected). \fIbyte\fR can be in the range from 0 to \fIinterleave\fR\-1,
|
|
where \fIinterleave\fR is given by the \fB\-i\fR or \fB\*(--interleave\fR
|
|
option, or the default of 4. This option is useful for creating files
|
|
to program \s-1ROM\s0. It is typically used with an \f(CW\*(C`srec\*(C'\fR output
|
|
target.
|
|
.Ip "\f(CW\*(C`\-i \f(CIinterleave\f(CW\*(C'\fR" 4
|
|
.IX Item "-i interleave"
|
|
.Ip "\f(CW\*(C`\-\-interleave=\f(CIinterleave\f(CW\*(C'\fR" 4
|
|
.IX Item "--interleave=interleave"
|
|
Only copy one out of every \fIinterleave\fR bytes. Select which byte to
|
|
copy with the \fI\-b\fR or \fB\*(--byte\fR option. The default is 4.
|
|
\&\f(CW\*(C`objcopy\*(C'\fR ignores this option if you do not specify either \fB\-b\fR or
|
|
\&\fB\*(--byte\fR.
|
|
.Ip "\f(CW\*(C`\-p\*(C'\fR" 4
|
|
.IX Item "-p"
|
|
.Ip "\f(CW\*(C`\-\-preserve\-dates\*(C'\fR" 4
|
|
.IX Item "--preserve-dates"
|
|
Set the access and modification dates of the output file to be the same
|
|
as those of the input file.
|
|
.Ip "\f(CW\*(C`\-\-debugging\*(C'\fR" 4
|
|
.IX Item "--debugging"
|
|
Convert debugging information, if possible. This is not the default
|
|
because only certain debugging formats are supported, and the
|
|
conversion process can be time consuming.
|
|
.Ip "\f(CW\*(C`\-\-gap\-fill \f(CIval\f(CW\*(C'\fR" 4
|
|
.IX Item "--gap-fill val"
|
|
Fill gaps between sections with \fIval\fR. This operation applies to
|
|
the \fIload address\fR (\s-1LMA\s0) of the sections. It is done by increasing
|
|
the size of the section with the lower address, and filling in the extra
|
|
space created with \fIval\fR.
|
|
.Ip "\f(CW\*(C`\-\-pad\-to \f(CIaddress\f(CW\*(C'\fR" 4
|
|
.IX Item "--pad-to address"
|
|
Pad the output file up to the load address \fIaddress\fR. This is
|
|
done by increasing the size of the last section. The extra space is
|
|
filled in with the value specified by \fB\*(--gap-fill\fR (default zero).
|
|
.Ip "\f(CW\*(C`\-\-set\-start \f(CIval\f(CW\*(C'\fR" 4
|
|
.IX Item "--set-start val"
|
|
Set the start address of the new file to \fIval\fR. Not all object file
|
|
formats support setting the start address.
|
|
.Ip "\f(CW\*(C`\-\-change\-start \f(CIincr\f(CW\*(C'\fR" 4
|
|
.IX Item "--change-start incr"
|
|
.Ip "\f(CW\*(C`\-\-adjust\-start \f(CIincr\f(CW\*(C'\fR" 4
|
|
.IX Item "--adjust-start incr"
|
|
Change the start address by adding \fIincr\fR. Not all object file
|
|
formats support setting the start address.
|
|
.Ip "\f(CW\*(C`\-\-change\-addresses \f(CIincr\f(CW\*(C'\fR" 4
|
|
.IX Item "--change-addresses incr"
|
|
.Ip "\f(CW\*(C`\-\-adjust\-vma \f(CIincr\f(CW\*(C'\fR" 4
|
|
.IX Item "--adjust-vma incr"
|
|
Change the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the start
|
|
address, by adding \fIincr\fR. Some object file formats do not permit
|
|
section addresses to be changed arbitrarily. Note that this does not
|
|
relocate the sections; if the program expects sections to be loaded at a
|
|
certain address, and this option is used to change the sections such
|
|
that they are loaded at a different address, the program may fail.
|
|
.Ip "\f(CW\*(C`\-\-change\-section\-address \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4
|
|
.IX Item "--change-section-address section{=,+,-}val"
|
|
.Ip "\f(CW\*(C`\-\-adjust\-section\-vma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4
|
|
.IX Item "--adjust-section-vma section{=,+,-}val"
|
|
Set or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of the named
|
|
\&\fIsection\fR. If \fB=\fR is used, the section address is set to
|
|
\&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the
|
|
section address. See the comments under \fB\*(--change-addresses\fR,
|
|
above. If \fIsection\fR does not exist in the input file, a warning will
|
|
be issued, unless \fB\*(--no-change-warnings\fR is used.
|
|
.Ip "\f(CW\*(C`\-\-change\-section\-lma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4
|
|
.IX Item "--change-section-lma section{=,+,-}val"
|
|
Set or change the \s-1LMA\s0 address of the named \fIsection\fR. The \s-1LMA\s0
|
|
address is the address where the section will be loaded into memory at
|
|
program load time. Normally this is the same as the \s-1VMA\s0 address, which
|
|
is the address of the section at program run time, but on some systems,
|
|
especially those where a program is held in \s-1ROM\s0, the two can be
|
|
different. If \fB=\fR is used, the section address is set to
|
|
\&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the
|
|
section address. See the comments under \fB\*(--change-addresses\fR,
|
|
above. If \fIsection\fR does not exist in the input file, a warning
|
|
will be issued, unless \fB\*(--no-change-warnings\fR is used.
|
|
.Ip "\f(CW\*(C`\-\-change\-section\-vma \f(CIsection\f(CW{=,+,\-}\f(CIval\f(CW\*(C'\fR" 4
|
|
.IX Item "--change-section-vma section{=,+,-}val"
|
|
Set or change the \s-1VMA\s0 address of the named \fIsection\fR. The \s-1VMA\s0
|
|
address is the address where the section will be located once the
|
|
program has started executing. Normally this is the same as the \s-1LMA\s0
|
|
address, which is the address where the section will be loaded into
|
|
memory, but on some systems, especially those where a program is held in
|
|
\&\s-1ROM\s0, the two can be different. If \fB=\fR is used, the section address
|
|
is set to \fIval\fR. Otherwise, \fIval\fR is added to or subtracted
|
|
from the section address. See the comments under
|
|
\&\fB\*(--change-addresses\fR, above. If \fIsection\fR does not exist in
|
|
the input file, a warning will be issued, unless
|
|
\&\fB\*(--no-change-warnings\fR is used.
|
|
.Ip "\f(CW\*(C`\-\-change\-warnings\*(C'\fR" 4
|
|
.IX Item "--change-warnings"
|
|
.Ip "\f(CW\*(C`\-\-adjust\-warnings\*(C'\fR" 4
|
|
.IX Item "--adjust-warnings"
|
|
If \fB\*(--change-section-address\fR or \fB\*(--change-section-lma\fR or
|
|
\&\fB\*(--change-section-vma\fR is used, and the named section does not
|
|
exist, issue a warning. This is the default.
|
|
.Ip "\f(CW\*(C`\-\-no\-change\-warnings\*(C'\fR" 4
|
|
.IX Item "--no-change-warnings"
|
|
.Ip "\f(CW\*(C`\-\-no\-adjust\-warnings\*(C'\fR" 4
|
|
.IX Item "--no-adjust-warnings"
|
|
Do not issue a warning if \fB\*(--change-section-address\fR or
|
|
\&\fB\*(--adjust-section-lma\fR or \fB\*(--adjust-section-vma\fR is used, even
|
|
if the named section does not exist.
|
|
.Ip "\f(CW\*(C`\-\-set\-section\-flags \f(CIsection\f(CW=\f(CIflags\f(CW\*(C'\fR" 4
|
|
.IX Item "--set-section-flags section=flags"
|
|
Set the flags for the named section. The \fIflags\fR argument is a
|
|
comma separated string of flag names. The recognized names are
|
|
\&\fBalloc\fR, \fBcontents\fR, \fBload\fR, \fBnoload\fR,
|
|
\&\fBreadonly\fR, \fBcode\fR, \fBdata\fR, \fBrom\fR, \fBshare\fR, and
|
|
\&\fBdebug\fR. You can set the \fBcontents\fR flag for a section which
|
|
does not have contents, but it is not meaningful to clear the
|
|
\&\fBcontents\fR flag of a section which does have contents\*(--just remove
|
|
the section instead. Not all flags are meaningful for all object file
|
|
formats.
|
|
.Ip "\f(CW\*(C`\-\-add\-section \f(CIsectionname\f(CW=\f(CIfilename\f(CW\*(C'\fR" 4
|
|
.IX Item "--add-section sectionname=filename"
|
|
Add a new section named \fIsectionname\fR while copying the file. The
|
|
contents of the new section are taken from the file \fIfilename\fR. The
|
|
size of the section will be the size of the file. This option only
|
|
works on file formats which can support sections with arbitrary names.
|
|
.Ip "\f(CW\*(C`\-\-change\-leading\-char\*(C'\fR" 4
|
|
.IX Item "--change-leading-char"
|
|
Some object file formats use special characters at the start of
|
|
symbols. The most common such character is underscore, which compilers
|
|
often add before every symbol. This option tells \f(CW\*(C`objcopy\*(C'\fR to
|
|
change the leading character of every symbol when it converts between
|
|
object file formats. If the object file formats use the same leading
|
|
character, this option has no effect. Otherwise, it will add a
|
|
character, or remove a character, or change a character, as
|
|
appropriate.
|
|
.Ip "\f(CW\*(C`\-\-remove\-leading\-char\*(C'\fR" 4
|
|
.IX Item "--remove-leading-char"
|
|
If the first character of a global symbol is a special symbol leading
|
|
character used by the object file format, remove the character. The
|
|
most common symbol leading character is underscore. This option will
|
|
remove a leading underscore from all global symbols. This can be useful
|
|
if you want to link together objects of different file formats with
|
|
different conventions for symbol names. This is different from
|
|
\&\f(CW\*(C`\-\-change\-leading\-char\*(C'\fR because it always changes the symbol name
|
|
when appropriate, regardless of the object file format of the output
|
|
file.
|
|
.Ip "\f(CW\*(C`\-\-srec\-len=\f(CIival\f(CW\*(C'\fR" 4
|
|
.IX Item "--srec-len=ival"
|
|
Meaningful only for srec output. Set the maximum length of the Srecords
|
|
being produced to \fIival\fR. This length covers both address, data and
|
|
crc fields.
|
|
.Ip "\f(CW\*(C`\-\-srec\-forceS3\*(C'\fR" 4
|
|
.IX Item "--srec-forceS3"
|
|
Meaningful only for srec output. Avoid generation of S1/S2 records,
|
|
creating S3\-only record format.
|
|
.Ip "\f(CW\*(C`\-\-redefine\-sym \f(CIold\f(CW=\f(CInew\f(CW\*(C'\fR" 4
|
|
.IX Item "--redefine-sym old=new"
|
|
Change the name of a symbol \fIold\fR, to \fInew\fR. This can be useful
|
|
when one is trying link two things together for which you have no
|
|
source, and there are name collisions.
|
|
.Ip "\f(CW\*(C`\-\-weaken\*(C'\fR" 4
|
|
.IX Item "--weaken"
|
|
Change all global symbols in the file to be weak. This can be useful
|
|
when building an object which will be linked against other objects using
|
|
the \f(CW\*(C`\-R\*(C'\fR option to the linker. This option is only effective when
|
|
using an object file format which supports weak symbols.
|
|
.Ip "\f(CW\*(C`\-\-keep\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4
|
|
.IX Item "--keep-symbols=filename"
|
|
Apply \fB\*(--keep-symbol\fR option to each symbol listed in the file
|
|
\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
|
|
name per line. Line comments may be introduced by the hash character.
|
|
This option may be given more than once.
|
|
.Ip "\f(CW\*(C`\-\-strip\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4
|
|
.IX Item "--strip-symbols=filename"
|
|
Apply \fB\*(--strip-symbol\fR option to each symbol listed in the file
|
|
\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
|
|
name per line. Line comments may be introduced by the hash character.
|
|
This option may be given more than once.
|
|
.Ip "\f(CW\*(C`\-\-keep\-global\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4
|
|
.IX Item "--keep-global-symbols=filename"
|
|
Apply \fB\*(--keep-global-symbol\fR option to each symbol listed in the
|
|
file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one
|
|
symbol name per line. Line comments may be introduced by the hash
|
|
character. This option may be given more than once.
|
|
.Ip "\f(CW\*(C`\-\-localize\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4
|
|
.IX Item "--localize-symbols=filename"
|
|
Apply \fB\*(--localize-symbol\fR option to each symbol listed in the file
|
|
\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
|
|
name per line. Line comments may be introduced by the hash character.
|
|
This option may be given more than once.
|
|
.Ip "\f(CW\*(C`\-\-weaken\-symbols=\f(CIfilename\f(CW\*(C'\fR" 4
|
|
.IX Item "--weaken-symbols=filename"
|
|
Apply \fB\*(--weaken-symbol\fR option to each symbol listed in the file
|
|
\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
|
|
name per line. Line comments may be introduced by the hash character.
|
|
This option may be given more than once.
|
|
.Ip "\f(CW\*(C`\-V\*(C'\fR" 4
|
|
.IX Item "-V"
|
|
.Ip "\f(CW\*(C`\-\-version\*(C'\fR" 4
|
|
.IX Item "--version"
|
|
Show the version number of \f(CW\*(C`objcopy\*(C'\fR.
|
|
.Ip "\f(CW\*(C`\-v\*(C'\fR" 4
|
|
.IX Item "-v"
|
|
.Ip "\f(CW\*(C`\-\-verbose\*(C'\fR" 4
|
|
.IX Item "--verbose"
|
|
Verbose output: list all object files modified. In the case of
|
|
archives, \fBobjcopy \-V\fR lists all members of the archive.
|
|
.Ip "\f(CW\*(C`\-\-help\*(C'\fR" 4
|
|
.IX Item "--help"
|
|
Show a summary of the options to \f(CW\*(C`objcopy\*(C'\fR.
|
|
.SH "SEE ALSO"
|
|
.IX Header "SEE ALSO"
|
|
\&\fIld\fR\|(1), \fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
|
|
.SH "COPYRIGHT"
|
|
.IX Header "COPYRIGHT"
|
|
Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
|
|
.PP
|
|
Permission is granted to copy, distribute and/or modify this document
|
|
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
|
|
or any later version published by the Free Software Foundation;
|
|
with no Invariant Sections, with no Front-Cover Texts, and with no
|
|
Back-Cover Texts. A copy of the license is included in the
|
|
section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
|