blob: fba32c08855a196380c8ef1677cffc637e65ed26 [file] [log] [blame]
Andrew Geissler84ad7c52020-06-27 00:00:16 -05001From b8c4b1fa22137d18d4ada7e350948035705f402f Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Sun, 2 Dec 2018 14:49:14 +0530
4Subject: [PATCH 25/43] [Patch,MicroBlaze]: fixed Build issue which are due to
5 conflicts in patches.
6
7---
8 bfd/elf32-microblaze.c | 1 +
9 bfd/elf64-microblaze.c | 12 ++++++------
10 3 files changed, 9 insertions(+), 8 deletions(-)
11
12diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
13index 2d8c062a42..6a795c5069 100644
14--- a/bfd/elf32-microblaze.c
15+++ b/bfd/elf32-microblaze.c
16@@ -1996,6 +1996,7 @@ microblaze_elf_relax_section (bfd *abfd,
17 /* This was a PC-relative instruction that was
18 completely resolved. */
19 int sfix, efix;
20+ unsigned int val;
21 bfd_vma target_address;
22 target_address = irel->r_addend + irel->r_offset;
23 sfix = calc_fixup (irel->r_offset, 0, sec);
24diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c
25index ef6a87062b..bed534e7dd 100644
26--- a/bfd/elf64-microblaze.c
27+++ b/bfd/elf64-microblaze.c
28@@ -2854,14 +2854,14 @@ microblaze_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
29 /* If this is a weak symbol, and there is a real definition, the
30 processor independent code will have arranged for us to see the
31 real definition first, and we can just use the same value. */
32- if (h->u.weakdef != NULL)
33+ if (h->is_weakalias)
34 {
35- BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
36- || h->u.weakdef->root.type == bfd_link_hash_defweak);
37- h->root.u.def.section = h->u.weakdef->root.u.def.section;
38- h->root.u.def.value = h->u.weakdef->root.u.def.value;
39+ struct elf_link_hash_entry *def = weakdef (h);
40+ BFD_ASSERT (def->root.type == bfd_link_hash_defined);
41+ h->root.u.def.section = def->root.u.def.section;
42+ h->root.u.def.value = def->root.u.def.value;
43 return TRUE;
44- }
45+ }
46
47 /* This is a reference to a symbol defined by a dynamic object which
48 is not a function. */
49--
502.17.1
51