blob: cd6965d70ef26532f8ae884929ec99d05056c051 [file] [log] [blame]
From cbe98e5a0cbc2337bf25d6b3f9dabcae38b95952 Mon Sep 17 00:00:00 2001
From: Mahesh Bodapati <mbodapat@xilinx.com>
Date: Tue, 26 Feb 2019 17:31:41 +0530
Subject: [PATCH] changes of "PR22458, failure to choose a matching ELF target"
is causing "Multiple Prevailing definition errors",added check for best_match
elf.
Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com>
Signed-off-by: Nagaraju Mekala <nagaraju.mekala@xilinx.com>
---
bfd/format.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/bfd/format.c b/bfd/format.c
index 97a9229..3a74cc4 100644
--- a/bfd/format.c
+++ b/bfd/format.c
@@ -292,7 +292,12 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
/* Don't check the default target twice. */
if (*target == &binary_vec
+#if !BFD_SUPPORTS_PLUGINS
|| (!abfd->target_defaulted && *target == save_targ))
+#else
+ || (!abfd->target_defaulted && *target == save_targ)
+ || (*target)->match_priority > best_match)
+#endif
continue;
/* If we already tried a match, the bfd is modified and may