All strip operations require section headers to be present, as do most
objcopy operations. BFD is seriously confused by objects without
section info. The error message added here is similar to the error
on attempting to strip/objcopy a zero length object.
PR binutils/16811
* objcopy.c (copy_object): Error if no sections.
+2014-04-07 Alan Modra <amodra@gmail.com>
+
+ PR binutils/16811
+ * objcopy.c (copy_object): Error if no sections.
+
2014-04-03 Markus Trippelsdorf <markus@trippelsdorf.de>
PR binutils/14698
return FALSE;
}
+ if (ibfd->sections == NULL)
+ {
+ non_fatal (_("error: the input file '%s' has no sections"),
+ bfd_get_archive_filename (ibfd));
+ return FALSE;
+ }
+
if (verbose)
printf (_("copy from `%s' [%s] to `%s' [%s]\n"),
bfd_get_archive_filename (ibfd), bfd_get_target (ibfd),