aboutsummaryrefslogtreecommitdiff
path: root/bfd/format.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/format.c')
-rw-r--r--bfd/format.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/format.c b/bfd/format.c
index 97cbd22..55ab44c 100644
--- a/bfd/format.c
+++ b/bfd/format.c
@@ -230,6 +230,9 @@ bfd_boolean
bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
{
extern const bfd_target binary_vec;
+#if BFD_SUPPORTS_PLUGINS
+ extern const bfd_target plugin_vec;
+#endif
const bfd_target * const *target;
const bfd_target **matching_vector = NULL;
const bfd_target *save_targ, *right_targ, *ar_right_targ, *match_targ;
@@ -315,6 +318,13 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
|| (*target)->match_priority > best_match)
continue;
+#if BFD_SUPPORTS_PLUGINS
+ /* Since the plugin target is explicitly specified when a BFD file
+ is opened, don't check it twice. */
+ if (*target == &plugin_vec)
+ continue;
+#endif
+
/* If we already tried a match, the bfd is modified and may
have sections attached, which will confuse the next
_bfd_check_format call. */