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 | 1a0a768be069977423d7d8f3dd6fd830c6c28eb5 (patch) | |
tree | 8c570b8b7b4939b0b35bff0878e4d39b3262782c /bfd/ihex.c | |
parent | e3951c82c077a678c759facec04b786886427a24 (diff) | |
download | gdb-1a0a768be069977423d7d8f3dd6fd830c6c28eb5.tar.gz |
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; |