mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 22:07:58 +08:00
* objcopy.c (copy_object): Revert yesterday's change.
* binutils.texi, objcopy.1: Remove special mention of --set-start and `binary' output format.
This commit is contained in:
@ -774,9 +774,8 @@ target of @samp{srec} (e.g., use @samp{-O srec}).
|
|||||||
output target of @samp{binary} (e.g., use @samp{-O binary}). When
|
output target of @samp{binary} (e.g., use @samp{-O binary}). When
|
||||||
@code{objcopy} generates a raw binary file, it will essentially produce
|
@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
|
a memory dump of the contents of the input object file. All symbols and
|
||||||
relocation information will be discarded. By default, the memory dump
|
relocation information will be discarded. The memory dump will start at
|
||||||
will start at virtual address zero; the @samp{--set-start} option may be
|
the virtual address of the lowest section copied into the output file.
|
||||||
used to specify a different starting point.
|
|
||||||
|
|
||||||
When generating an S-record or a raw binary file, it may be helpful to
|
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
|
use @samp{-S} to remove sections containing debugging information. In
|
||||||
@ -849,9 +848,7 @@ copy with the @var{-b} or @samp{--byte} option. The default is 4.
|
|||||||
|
|
||||||
@item --set-start @var{val}
|
@item --set-start @var{val}
|
||||||
Set the address of the new file to @var{val}. Not all object file
|
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}
|
formats support setting the start address.
|
||||||
output file format, the start address sets the virtual address of the
|
|
||||||
first byte in the binary output file.
|
|
||||||
|
|
||||||
@item --adjust-start @var{incr}
|
@item --adjust-start @var{incr}
|
||||||
Adjust the start address by adding @var{incr}. Not all object file
|
Adjust the start address by adding @var{incr}. Not all object file
|
||||||
|
@ -70,10 +70,8 @@ When
|
|||||||
.B objcopy
|
.B objcopy
|
||||||
generates a raw binary file, it will essentially produce a memory dump
|
generates a raw binary file, it will essentially produce a memory dump
|
||||||
of the contents of the input object file. All symbols and relocation
|
of the contents of the input object file. All symbols and relocation
|
||||||
information will be discarded. By default, the memory dump will start
|
information will be discarded. The memory dump will start at the
|
||||||
at virtual address zero; the
|
virtual address of the lowest section copied into the output file.
|
||||||
.B --set-start
|
|
||||||
option may be used to specify a different starting point.
|
|
||||||
.PP
|
.PP
|
||||||
When generating an S-record or a raw binary file, it may be helpful to
|
When generating an S-record or a raw binary file, it may be helpful to
|
||||||
use
|
use
|
||||||
@ -140,9 +138,7 @@ The interleave is ignored if neither \fB\-b\fP nor \fB\-\-byte\fP is given.
|
|||||||
.TP
|
.TP
|
||||||
.B \fB\-\-set\-start=\fIval
|
.B \fB\-\-set\-start=\fIval
|
||||||
Set the start address of the new file to \fIval\fP. Not all object
|
Set the start address of the new file to \fIval\fP. Not all object
|
||||||
file formats support setting the start address. When using the
|
file formats support setting the start address.
|
||||||
\fBbinary\fP output file format, the start address sets the virtual
|
|
||||||
address of the first byte in the binary output file.
|
|
||||||
.TP
|
.TP
|
||||||
.B \fB\-\-adjust\-start=\fIincr
|
.B \fB\-\-adjust\-start=\fIincr
|
||||||
Adjust the start address by adding \fIincr\fP. Not all object file
|
Adjust the start address by adding \fIincr\fP. Not all object file
|
||||||
|
@ -316,15 +316,7 @@ copy_object (ibfd, obfd)
|
|||||||
if (set_start_set)
|
if (set_start_set)
|
||||||
start = set_start;
|
start = set_start;
|
||||||
else
|
else
|
||||||
{
|
start = bfd_get_start_address (ibfd);
|
||||||
/* 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 += adjust_start;
|
start += adjust_start;
|
||||||
|
|
||||||
if (!bfd_set_start_address (obfd, start)
|
if (!bfd_set_start_address (obfd, start)
|
||||||
|
Reference in New Issue
Block a user