Do not allow records to cross a 64K boundary - wrap if necessary.
authorNick Clifton <nickc@redhat.com>
Tue, 2 Apr 2002 14:08:51 +0000 (14:08 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 2 Apr 2002 14:08:51 +0000 (14:08 +0000)
bfd/ChangeLog
bfd/ihex.c

index d7f157c1440c5ff46e6d96bf84a8558d7a5345a6..1c335a1f321e52e43dff4eea12747b8d4abf4890 100644 (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
index 0b02e6dee33ef78598e275f438820457e5c2a4d8..613eaf3b189fdd75aacbb049699f11178884e353 100644 (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;
 
This page took 0.027648 seconds and 4 git commands to generate.