summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd/ihex.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-04-12 19:33:52 +0000
committerobrien <obrien@FreeBSD.org>2002-04-12 19:33:52 +0000
commit18ff9f4f1bddd11c341a37177885ac89fcccedd9 (patch)
treeb6180daa6d6e558ce86214f98d103e01ff4e70ff /contrib/binutils/bfd/ihex.c
parent1d1ccbf8e10277966ecf3c150370a50c9e184b35 (diff)
downloadFreeBSD-src-18ff9f4f1bddd11c341a37177885ac89fcccedd9.zip
FreeBSD-src-18ff9f4f1bddd11c341a37177885ac89fcccedd9.tar.gz
Import of Binutils from the FSF 2.12 branch.
(this fixes several linker problems and coredumps) These bits are taken from the FSF anoncvs repo on 10-April-2002 13:24 Zulu
Diffstat (limited to 'contrib/binutils/bfd/ihex.c')
-rw-r--r--contrib/binutils/bfd/ihex.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/binutils/bfd/ihex.c b/contrib/binutils/bfd/ihex.c
index 0b02e6d..613eaf3 100644
--- a/contrib/binutils/bfd/ihex.c
+++ b/contrib/binutils/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;
OpenPOWER on IntegriCloud