2006-09-05 Bibo Mao <bibo.mao@intel.com>
[deliverable/binutils-gdb.git] / bfd / format.c
index 4ccca2a3aa789492d7f418a5daf3c5eb5031c97b..6a34dd2bea488b2b93bf7d34e8304f222ddcc8de 100644 (file)
@@ -38,6 +38,8 @@ SECTION
 
        The BFD contains the result of an executable core dump.
 
+SUBSECTION
+       File format functions
 */
 
 #include "bfd.h"
@@ -215,7 +217,9 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
       const bfd_target *temp;
       bfd_error_type err;
 
-      if (*target == &binary_vec)
+      /* Don't check the default target twice.  */
+      if (*target == &binary_vec
+         || (!abfd->target_defaulted && *target == save_targ))
        continue;
 
       abfd->xvec = *target;    /* Change BFD's target temporarily.  */
This page took 0.023393 seconds and 4 git commands to generate.