output target of @samp{binary} (e.g., use @samp{-O binary}). When
@code{objcopy} 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. By default, the memory dump
-will start at virtual address zero; the @samp{--set-start} option may be
-used to specify a different starting point.
+relocation information will be discarded. The memory dump will start at
+the virtual address of the lowest section copied into the output file.
When generating an S-record or a raw binary file, it may be helpful to
use @samp{-S} to remove sections containing debugging information. In
@item --set-start @var{val}
Set the address of the new file to @var{val}. Not all object file
-formats support setting the start address. When using the @samp{binary}
-output file format, the start address sets the virtual address of the
-first byte in the binary output file.
+formats support setting the start address.
@item --adjust-start @var{incr}
Adjust the start address by adding @var{incr}. Not all object file
.B objcopy
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. By default, the memory dump will start
-at virtual address zero; the
-.B --set-start
-option may be used to specify a different starting point.
+information will be discarded. The memory dump will start at the
+virtual 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
.TP
.B \fB\-\-set\-start=\fIval
Set the start address of the new file to \fIval\fP. Not all object
-file formats support setting the start address. When using the
-\fBbinary\fP output file format, the start address sets the virtual
-address of the first byte in the binary output file.
+file formats support setting the start address.
.TP
.B \fB\-\-adjust\-start=\fIincr
Adjust the start address by adding \fIincr\fP. Not all object file
if (set_start_set)
start = set_start;
else
- {
- /* As a special hack make it easier to generate a raw binary
- file, we default the starting address to zero for the binary
- output format. */
- if (strcmp (bfd_get_target (obfd), "binary") == 0)
- start = 0;
- else
- start = bfd_get_start_address (ibfd);
- }
+ start = bfd_get_start_address (ibfd);
start += adjust_start;
if (!bfd_set_start_address (obfd, start)