+2014-03-14 Anthony Green <green@moxielogic.com>
+
+ * objcopy.c (copy_object): Check fwrite return code.
+
2014-03-14 Meador Inge <meadori@codesourcery.com>
* dwarf.c (strnlen): Move prototype ...
bfd_byte * contents = xmalloc (size);
if (bfd_get_section_contents (ibfd, sec, contents, 0, size))
- fwrite (contents, 1, size, f);
+ {
+ if (fwrite (contents, 1, size, f) != size)
+ fatal (_("error writing section contents to %s (error: %s)"),
+ pdump->filename,
+ strerror (errno));
+ }
else
bfd_nonfatal_message (NULL, ibfd, sec,
_("could not retrieve section contents"));