sdobjcopy
6-15
cases
‘-R
’ will be useful to remove sections which contain information
which is not needed by the binary file.
infile
outfile
The source and output files, respectively. If you do not specify
outfile
,
objcopy
creates a temporary file and destructively renames the result
with the name of
infile
.
Options
Table 6.9
sdobjcopy Options
Option
Description
-O
bfdname
|
--output-target=
bfdname
Write the output file using the object format bfdname.
-b
byte
|
--byte=
byte
Keep only every byteth byte of the input file (header data is not
affected).
byte
can be in the range from 0 to interleave-1, where
interleave is given by the
-i
or
--
interleave
option, or the default
of 4. This option is useful for creating files to program ROM. It is
typically used with an srec output target.
-i
interleave
|
--
interleave=
interleave
Copy only one out of every
interleave
bytes. Select which byte to copy
with the
-b
or
--byte
option. The default is 4.
objcopy
ignores this
option if you do not specify either
-b
or
--byte
.
--gap-fill
val
Fill gaps between sections with
val
. This operation applies to the load
address (LMA) 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
val
.
--pad-to
address
Pad the output file up to the load address
address
by increasing the
size of the last section. The extra space is filled in with the value
specified by
--gap-fill
(default zero).
--set-start
val
Set the address of the new file to
val
. Not all object file formats
support setting the start address.