Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame^] | 1 | From cbe98e5a0cbc2337bf25d6b3f9dabcae38b95952 Mon Sep 17 00:00:00 2001 |
| 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
| 3 | Date: Tue, 26 Feb 2019 17:31:41 +0530 |
| 4 | Subject: [PATCH] changes of "PR22458, failure to choose a matching ELF target" |
| 5 | is causing "Multiple Prevailing definition errors",added check for best_match |
| 6 | elf. |
| 7 | |
| 8 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> |
| 9 | Signed-off-by: Nagaraju Mekala <nagaraju.mekala@xilinx.com> |
| 10 | |
| 11 | --- |
| 12 | bfd/format.c | 5 +++++ |
| 13 | 1 file changed, 5 insertions(+) |
| 14 | |
| 15 | diff --git a/bfd/format.c b/bfd/format.c |
| 16 | index 97a9229..3a74cc4 100644 |
| 17 | --- a/bfd/format.c |
| 18 | +++ b/bfd/format.c |
| 19 | @@ -292,7 +292,12 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) |
| 20 | |
| 21 | /* Don't check the default target twice. */ |
| 22 | if (*target == &binary_vec |
| 23 | +#if !BFD_SUPPORTS_PLUGINS |
| 24 | || (!abfd->target_defaulted && *target == save_targ)) |
| 25 | +#else |
| 26 | + || (!abfd->target_defaulted && *target == save_targ) |
| 27 | + || (*target)->match_priority > best_match) |
| 28 | +#endif |
| 29 | continue; |
| 30 | |
| 31 | /* If we already tried a match, the bfd is modified and may |