mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-02 02:35:00 +08:00
* objcopy.c (copy_object): If the output file format is `binary',
and the start address was not set using --set-start, default the start address to zero. This hack is because the `binary' output file format uses the start address to set the virtual address of the first byte in the file. * binutils.texi, objcopy.1: Add some notes on generating S-records and binary files.
This commit is contained in:
@ -316,7 +316,15 @@ copy_object (ibfd, obfd)
|
||||
if (set_start_set)
|
||||
start = set_start;
|
||||
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;
|
||||
|
||||
if (!bfd_set_start_address (obfd, start)
|
||||
|
Reference in New Issue
Block a user