blob: d0ca677c5c19d04ec3032ecfa74ec22a975f1ed4 [file] [log] [blame]
Andrew Geissler84ad7c52020-06-27 00:00:16 -05001From 50bd636604305329b302b9fbbb692795d26f5fa5 Mon Sep 17 00:00:00 2001
Brad Bishop26bdd442019-08-16 17:08:17 -04002From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Wed, 28 Nov 2018 14:00:29 +0530
Andrew Geissler84ad7c52020-06-27 00:00:16 -05004Subject: [PATCH 24/43] Fixed the bug in the R_MICROBLAZE_64_NONE relocation.
5 It was adjusting only lower 16bits.
Brad Bishop26bdd442019-08-16 17:08:17 -04006
7---
8 bfd/elf32-microblaze.c | 4 ++--
9 bfd/elf64-microblaze.c | 4 ++--
10 2 files changed, 4 insertions(+), 4 deletions(-)
11
12diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
Andrew Geissler84ad7c52020-06-27 00:00:16 -050013index 035e71f311..2d8c062a42 100644
Brad Bishop26bdd442019-08-16 17:08:17 -040014--- a/bfd/elf32-microblaze.c
15+++ b/bfd/elf32-microblaze.c
16@@ -2022,8 +2022,8 @@ microblaze_elf_relax_section (bfd *abfd,
17 sfix = calc_fixup (irel->r_offset + INST_WORD_SIZE, 0, sec);
18 efix = calc_fixup (target_address, 0, sec);
19 irel->r_addend -= (efix - sfix);
20- microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset
21- + INST_WORD_SIZE, irel->r_addend);
22+ microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset,
23+ irel->r_addend);
24 }
25 break;
26 }
27diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c
Andrew Geissler84ad7c52020-06-27 00:00:16 -050028index 184b7d560d..ef6a87062b 100644
Brad Bishop26bdd442019-08-16 17:08:17 -040029--- a/bfd/elf64-microblaze.c
30+++ b/bfd/elf64-microblaze.c
31@@ -2017,8 +2017,8 @@ microblaze_elf_relax_section (bfd *abfd,
32 sfix = calc_fixup (irel->r_offset + INST_WORD_SIZE, 0, sec);
33 efix = calc_fixup (target_address, 0, sec);
34 irel->r_addend -= (efix - sfix);
35- microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset
36- + INST_WORD_SIZE, irel->r_addend);
37+ microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset,
38+ irel->r_addend);
39 }
40 break;
41 }
Andrew Geissler84ad7c52020-06-27 00:00:16 -050042--
432.17.1
44