* bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
[deliverable/binutils-gdb.git] / bfd / archive.c
index 0a6f0236eeb94f04df7818acfd52c9462bd7a12e..5f673e1dfee913207257946b66984d1781b74751 100644 (file)
@@ -684,15 +684,19 @@ bfd_generic_archive_p (abfd)
          if (bfd_check_format (first, bfd_object)
              && first->xvec != abfd->xvec)
            {
+#if 0
+             /* We ought to close `first' here, but we can't, because
+                we have no way to remove it from the archive cache.
+                It's close to impossible to figure out when we can
+                release bfd_ardata.  FIXME.  */
              (void) bfd_close (first);
              bfd_release (abfd, bfd_ardata (abfd));
              abfd->tdata.aout_ar_data = tdata_hold;
-             bfd_set_error (bfd_error_wrong_format);
+#endif
+             bfd_set_error (bfd_error_wrong_object_format);
              return NULL;
            }
-
-         /* We ought to close first here, but we can't, because we
-             have no way to remove it from the archive cache.  FIXME.  */
+         /* And we ought to close `first' here too.  */
        }
     }
 
This page took 0.024504 seconds and 4 git commands to generate.