* config/obj-coffbfd.c (fill_section): Don't ever fill past the
authorSteve Chamberlain <sac@cygnus>
Fri, 7 Jan 1994 17:42:34 +0000 (17:42 +0000)
committerSteve Chamberlain <sac@cygnus>
Fri, 7 Jan 1994 17:42:34 +0000 (17:42 +0000)
end of a section. (write_object_file): Temporary fix - setup
stdoutput.

gas/ChangeLog
gas/config/obj-coffbfd.c

index c5502ec96f9de350e048ec1aa11cd5e113d0fd1a..33fde722513f08e862155cf0cd6f9e38699ca6d3 100644 (file)
@@ -1,3 +1,9 @@
+Fri Jan  7 09:38:25 1994  Steve Chamberlain  (sac@cygnus.com)
+
+       * config/obj-coffbfd.c (fill_section):  Don't ever fill past the
+       end of a section. (write_object_file): Temporary fix - setup
+       stdoutput.
+
 Thu Jan  6 18:05:21 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
 
        * config/tc-sparc.c (tc_gen_reloc): Fix handling of addends in
index 3a93f363ba6f2991fd651b55cab3efd36238b006..2e42c144f83c8d6a222196db968881654e000ca9 100644 (file)
@@ -565,7 +565,7 @@ DEFUN (fill_section, (abfd, h, file_cursor),
                      unsigned int off = frag->fr_fix;
                      for (count = frag->fr_offset; count; count--)
                        {
-                         if (fill_size < s->s_size)
+                         if (fill_size + frag->fr_address + off < s->s_size)
                            {
                              memcpy (buffer + frag->fr_address + off,
                                      frag->fr_literal + frag->fr_fix,
@@ -1932,10 +1932,19 @@ DEFUN_VOID (write_object_file)
   }
 
   coff_header_append (abfd, &headers);
-  
+#if 0
+  /* Recent changes to write need this, but where it should
+     go is up to Ken.. */
   if (bfd_close_all_done (abfd) == false)
     as_fatal ("Can't close %s: %s", out_file_name,
              bfd_errmsg (bfd_error));
+#else
+  {
+    extern bfd *stdoutput;
+    stdoutput = abfd;
+  }
+#endif
+
 }
 
 /* Add a new segment.  This is called from subseg_new via the