aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-bsp/recipes-microblaze/binutils/binutils-2.31/0026-Patch-Microblaze-changes-of-PR22458-failure-to-choos.patch
blob: a7ecec15066d54dad97b613bb85e77e129f79e70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From c0be3d2a8f0ac0c1a2ba82253c9eea99071da0a9 Mon Sep 17 00:00:00 2001
From: Mahesh Bodapati <mbodapat@xilinx.com>
Date: Tue, 26 Feb 2019 17:31:41 +0530
Subject: [PATCH 26/31] [Patch,Microblaze] : 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 c4afd97..4f7367d 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
-- 
2.7.4