* config/obj-coff.c (coff_header_append): Check return value of
authorIan Lance Taylor <ian@airs.com>
Thu, 9 Mar 1995 23:02:43 +0000 (23:02 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 9 Mar 1995 23:02:43 +0000 (23:02 +0000)
bfd_coff_swap_scnhdr_out.

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

index 9c5baa17d045ba49a3e5144c8a2e505b8f22eff3..abbbcddad57ea6f56e20d0ba8ff663585bf60ad2 100644 (file)
@@ -1,3 +1,8 @@
+Thu Mar  9 18:01:37 1995  Ian Lance Taylor  <ian@cygnus.com>
+
+       * config/obj-coff.c (coff_header_append): Check return value of
+       bfd_coff_swap_scnhdr_out.
+
 Thu Mar  9 13:51:30 1995  Doug Evans  <dje@canuck.cygnus.com>
 
        Delete this patch, it breaks the h8300 assembler.
index 79b9af28752a85018bf9d7c868b07a07ce00b3c9..0fb2d26aba22a6354f7dd94107f07b3053fddc34 100644 (file)
@@ -1834,6 +1834,8 @@ coff_header_append (abfd, h)
          bfd_coff_swap_scnhdr_out (abfd,
                                    &(segment_info[i].scnhdr),
                                    buffer);
+         if (size == 0)
+           as_bad ("bfd_coff_swap_scnhdr_out failed");
          bfd_write (buffer, size, 1, abfd);
        }
     }