summaryrefslogtreecommitdiffstats
path: root/meta-microblaze/recipes-devtools/binutils/binutils/0020-Fixed-the-bug-in-the-R_MICROBLAZE_64_NONE-relocation.patch
blob: ff1702cf059e7ab97281f5327653dcc857018519 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From 6c6490ed5a5c5c00d1b18a1f446280689bb572d1 Mon Sep 17 00:00:00 2001
From: Nagaraju Mekala <nmekala@xilix.com>
Date: Wed, 28 Nov 2018 14:00:29 +0530
Subject: [PATCH 20/34] Fixed the bug in the R_MICROBLAZE_64_NONE relocation.
 It was adjusting only lower 16bits.

Conflicts:
	bfd/elf64-microblaze.c
Upstream-Status: Pending

Signed-off-by: Mark Hatle <mark.hatle@amd.com>

---
 bfd/elf32-microblaze.c | 4 ++--
 bfd/elf64-microblaze.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index f20adb6fd73..88ac730582b 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -2060,8 +2060,8 @@ microblaze_elf_relax_section (bfd *abfd,
 		sfix = calc_fixup (irel->r_offset + INST_WORD_SIZE, 0, sec);
 		efix = calc_fixup (target_address, 0, sec);
 		irel->r_addend -= (efix - sfix);
-    microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset
-				       + INST_WORD_SIZE, irel->r_addend);
+    microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset,
+                                       irel->r_addend);
 	      }
 	      break;
 	    }
diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c
index eb7f9138884..03fe9eba53a 100644
--- a/bfd/elf64-microblaze.c
+++ b/bfd/elf64-microblaze.c
@@ -2098,8 +2098,8 @@ microblaze_elf_relax_section (bfd *abfd,
 		sfix = calc_fixup (irel->r_offset + INST_WORD_SIZE, 0, sec);
 		efix = calc_fixup (target_address, 0, sec);
 		irel->r_addend -= (efix - sfix);
-    microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset
-				       + INST_WORD_SIZE, irel->r_addend);
+    microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset,
+                                       irel->r_addend);
 	      }
 	      break;
 	    }
-- 
2.37.1 (Apple Git-137.1)