Replace xmalloc/xfree with vector in jit.c
[deliverable/binutils-gdb.git] / bfd / format.c
index 97a92291a8794f0b86646e7ddfbd02b61de6a939..1d1363d18403cef706ec1a81f164c5b6521dd20f 100644 (file)
@@ -290,8 +290,15 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
     {
       const bfd_target *temp;
 
-      /* Don't check the default target twice.  */
+      /* The binary target matches anything, so don't return it when
+        searching.  Don't match the plugin target if we have another
+        alternative since we want to properly set the input format
+        before allowing a plugin to claim the file.  Also, don't
+        check the default target twice.  */
       if (*target == &binary_vec
+#if BFD_SUPPORTS_PLUGINS
+         || (match_count != 0 && *target == &plugin_vec)
+#endif
          || (!abfd->target_defaulted && *target == save_targ))
        continue;
 
This page took 0.024363 seconds and 4 git commands to generate.