]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - binutils/objcopy.c
PR26348, Malloc error in write_zeros
[thirdparty/binutils-gdb.git] / binutils / objcopy.c
index 3866c7f458861dd522a44e07b20d8485f66719b1..c5af179b17e0690372cf40141ead226c2127e5f2 100644 (file)
@@ -2604,7 +2604,15 @@ copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch)
     {
       /* 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)"));
+      non_fatal (_("unable to change endianness of '%s'"),
+                bfd_get_archive_filename (ibfd));
+      return FALSE;
+    }
+
+  if (ibfd->read_only)
+    {
+      non_fatal (_("unable to modify '%s' due to errors"),
+                bfd_get_archive_filename (ibfd));
       return FALSE;
     }