flagword flags = bfd_get_section_flags (abfd, sec);
if (seginfo == NULL
- || sec->size == 0
+ || sec->size < 32
|| (flags & (SEC_ALLOC | SEC_HAS_CONTENTS)) == SEC_ALLOC)
return;
(stdoutput, sec, buf, (file_ptr) offset,
(bfd_size_type) n_per_buf * fill_size);
if (!x)
- as_fatal (_("cannot write to output file"));
+ as_fatal (_("cannot write to output file '%s': %s"),
+ stdoutput->filename,
+ bfd_errmsg (bfd_get_error ()));
offset += n_per_buf * fill_size;
}
}