Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame^] | 1 | From ed3e6fad3e2a626fc987e9c7477f51d03d2b4512 Mon Sep 17 00:00:00 2001 |
| 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
| 3 | Date: Wed, 28 Nov 2018 14:00:29 +0530 |
| 4 | Subject: [PATCH] Fixed the bug in the R_MICROBLAZE_64_NONE relocation. It was |
| 5 | adjusting only lower 16bits. |
| 6 | |
| 7 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> |
| 8 | Signed-off-by: Nagaraju Mekala <nagaraju.mekala@xilinx.com> |
| 9 | |
| 10 | --- |
| 11 | bfd/elf32-microblaze.c | 4 ++-- |
| 12 | bfd/elf64-microblaze.c | 4 ++-- |
| 13 | 2 files changed, 4 insertions(+), 4 deletions(-) |
| 14 | |
| 15 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c |
| 16 | index 035e71f..2d8c062 100644 |
| 17 | --- a/bfd/elf32-microblaze.c |
| 18 | +++ b/bfd/elf32-microblaze.c |
| 19 | @@ -2022,8 +2022,8 @@ microblaze_elf_relax_section (bfd *abfd, |
| 20 | sfix = calc_fixup (irel->r_offset + INST_WORD_SIZE, 0, sec); |
| 21 | efix = calc_fixup (target_address, 0, sec); |
| 22 | irel->r_addend -= (efix - sfix); |
| 23 | - microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset |
| 24 | - + INST_WORD_SIZE, irel->r_addend); |
| 25 | + microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset, |
| 26 | + irel->r_addend); |
| 27 | } |
| 28 | break; |
| 29 | } |
| 30 | diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c |
| 31 | index 184b7d5..ef6a870 100644 |
| 32 | --- a/bfd/elf64-microblaze.c |
| 33 | +++ b/bfd/elf64-microblaze.c |
| 34 | @@ -2017,8 +2017,8 @@ microblaze_elf_relax_section (bfd *abfd, |
| 35 | sfix = calc_fixup (irel->r_offset + INST_WORD_SIZE, 0, sec); |
| 36 | efix = calc_fixup (target_address, 0, sec); |
| 37 | irel->r_addend -= (efix - sfix); |
| 38 | - microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset |
| 39 | - + INST_WORD_SIZE, irel->r_addend); |
| 40 | + microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset, |
| 41 | + irel->r_addend); |
| 42 | } |
| 43 | break; |
| 44 | } |