blob: aef46b3f9eac6e1492c0c69b1e92537070641b00 [file] [log] [blame]
Andrew Geissler84ad7c52020-06-27 00:00:16 -05001From e7f43c3afe90faa42c09f368671972c26c2b7b38 Mon Sep 17 00:00:00 2001
Brad Bishop26bdd442019-08-16 17:08:17 -04002From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 26 Feb 2019 17:31:41 +0530
Andrew Geissler84ad7c52020-06-27 00:00:16 -05004Subject: [PATCH 26/43] [Patch,Microblaze] : changes of "PR22458, failure to
5 choose a matching ELF target" is causing "Multiple Prevailing definition
6 errors",added check for best_match elf.
Brad Bishop26bdd442019-08-16 17:08:17 -04007
8---
9 bfd/format.c | 5 +++++
10 1 file changed, 5 insertions(+)
11
12diff --git a/bfd/format.c b/bfd/format.c
Andrew Geissler84ad7c52020-06-27 00:00:16 -050013index 97a92291a8..3a74cc49d2 100644
Brad Bishop26bdd442019-08-16 17:08:17 -040014--- a/bfd/format.c
15+++ b/bfd/format.c
16@@ -292,7 +292,12 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
17
18 /* Don't check the default target twice. */
19 if (*target == &binary_vec
20+#if !BFD_SUPPORTS_PLUGINS
21 || (!abfd->target_defaulted && *target == save_targ))
22+#else
23+ || (!abfd->target_defaulted && *target == save_targ)
24+ || (*target)->match_priority > best_match)
25+#endif
26 continue;
27
28 /* If we already tried a match, the bfd is modified and may
Andrew Geissler84ad7c52020-06-27 00:00:16 -050029--
302.17.1
31