This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Fix the genetation of GOT entries for the Microblaze target.
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 23 Feb 2016 10:37:58 -0000
- Subject: [binutils-gdb] Fix the genetation of GOT entries for the Microblaze target.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=47993b4af18c6ef1cad300f6393bf896d3cb5e5c
commit 47993b4af18c6ef1cad300f6393bf896d3cb5e5c
Author: Rich Felker <bugdal@aerifal.cx>
Date: Tue Feb 23 10:37:24 2016 +0000
Fix the genetation of GOT entries for the Microblaze target.
PR target/19516
* elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
Always produce a RELATIVE reloc for a local symbol.
Diff:
---
bfd/ChangeLog | 6 ++++++
bfd/elf32-microblaze.c | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 611f905..5ec3b93 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2016-02-23 Rich Felker <bugdal@aerifal.cx>
+
+ PR target/19516
+ * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
+ Always produce a RELATIVE reloc for a local symbol.
+
2016-02-23 Hans-Peter Nilsson <hp@axis.com>
Fix test-case ld-elf/pr19617b
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index b9c32a4..7cc2a73 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -3288,7 +3288,7 @@ microblaze_elf_finish_dynamic_symbol (bfd *output_bfd,
BFD_ASSERT (sgot != NULL && srela != NULL);
offset = (sgot->output_section->vma + sgot->output_offset
- + (h->got.offset &~ (bfd_vma) 1));
+ + (h->got.offset &~ (bfd_vma) 1));
/* If this is a -Bsymbolic link, and the symbol is defined
locally, we just want to emit a RELATIVE reloc. Likewise if
@@ -3296,8 +3296,8 @@ microblaze_elf_finish_dynamic_symbol (bfd *output_bfd,
The entry in the global offset table will already have been
initialized in the relocate_section function. */
if (bfd_link_pic (info)
- && (info->symbolic || h->dynindx == -1)
- && h->def_regular)
+ && ((info->symbolic && h->def_regular)
+ || h->dynindx == -1))
{
asection *sec = h->root.u.def.section;
microblaze_elf_output_dynamic_relocation (output_bfd,