Do not allow records to cross a 64K boundary - wrap if necessary.

This commit is contained in:
Nick Clifton 2002-04-02 14:08:51 +00:00
parent 5f44c186d7
commit 9e81ee6719
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
* ihex.c (ihex_write_object_contents): Do not allow records to
cross a 64K boundary - wrap if necessary.
2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
* elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error

View File

@ -873,6 +873,11 @@ ihex_write_object_contents (abfd)
}
rec_addr = where - (extbase + segbase);
/* Output records shouldn't cross 64K boundaries. */
if (rec_addr + now > 0xfffff)
now = 0xffff - rec_addr;
if (! ihex_write_record (abfd, now, rec_addr, 0, p))
return false;