diff options
author | Nick Clifton <nickc@redhat.com> | 2002-04-02 14:08:51 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-04-02 14:08:51 +0000 |
commit | 9e81ee671975bd958743c2a43bd78f75368214b1 (patch) | |
tree | 957c181de4b7f6393743fb5c184e952d972490a5 /bfd/ihex.c | |
parent | 5f44c186d76efda9c6cef2d39b404a0b3f88036d (diff) | |
download | binutils-9e81ee671975bd958743c2a43bd78f75368214b1.tar.gz binutils-9e81ee671975bd958743c2a43bd78f75368214b1.tar.bz2 binutils-9e81ee671975bd958743c2a43bd78f75368214b1.zip |
Do not allow records to cross a 64K boundary - wrap if necessary.
Diffstat (limited to 'bfd/ihex.c')
-rw-r--r-- | bfd/ihex.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/ihex.c b/bfd/ihex.c index 0b02e6dee33..613eaf3b189 100644 --- a/bfd/ihex.c +++ b/bfd/ihex.c @@ -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; |