From 9e81ee671975bd958743c2a43bd78f75368214b1 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 2 Apr 2002 14:08:51 +0000 Subject: Do not allow records to cross a 64K boundary - wrap if necessary. --- bfd/ihex.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bfd/ihex.c') diff --git a/bfd/ihex.c b/bfd/ihex.c index 0b02e6d..613eaf3 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; -- cgit v1.1