if (ibfd->xvec->byteorder != obfd->xvec->byteorder
&& ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN
&& obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
- fatal (_("Unable to change endianness of input file(s)"));
+ {
+ /* PR 17636: Call non-fatal so that we return to our parent who
+ may need to tidy temporary files. */
+ non_fatal (_("Unable to change endianness of input file(s)"));
+ return FALSE;
+ }
if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
{
pupdate->section = bfd_get_section_by_name (ibfd, pupdate->name);
if (pupdate->section == NULL)
- fatal (_("error: %s not found, can't be updated"), pupdate->name);
+ {
+ non_fatal (_("error: %s not found, can't be updated"), pupdate->name);
+ return FALSE;
+ }
osec = pupdate->section->output_section;
if (! bfd_set_section_size (obfd, osec, pupdate->size))
if (bfd_get_section_contents (ibfd, sec, contents, 0, size))
{
if (fwrite (contents, 1, size, f) != size)
- fatal (_("error writing section contents to %s (error: %s)"),
- pdump->filename,
- strerror (errno));
+ {
+ non_fatal (_("error writing section contents to %s (error: %s)"),
+ pdump->filename,
+ strerror (errno));
+ return FALSE;
+ }
}
else
bfd_nonfatal_message (NULL, ibfd, sec,
{
status = 1;
bfd_nonfatal_message (NULL, obfd, NULL, NULL);
- return;
+ goto cleanup_and_exit;
}
while (!status && this_element != NULL)
unlink (l->name);
}
}
+
rmdir (dir);
}