This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] [ARC] Add RELOC_FOR_GLOBAL_SYMBOL in ARC target code.
- From: Cupertino Miranda <cmiranda at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 8 Jun 2017 17:01:47 -0000
- Subject: [binutils-gdb] [ARC] Add RELOC_FOR_GLOBAL_SYMBOL in ARC target code.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f4e6805f98d2b3eae305f66ba26ab25aae1485f2
commit f4e6805f98d2b3eae305f66ba26ab25aae1485f2
Author: Cupertino Miranda <cmiranda@synopsys.com>
Date: Wed Nov 30 20:23:21 2016 +0100
[ARC] Add RELOC_FOR_GLOBAL_SYMBOL in ARC target code.
This miss was identified in the context of openssh building for ARC.
bfd/ChangeLog:
Cupertino Miranda <cmiranda@synopsys.com>
elf32-arc.c (elf_arc_relocate_section): Added "call" to
RELOC_FOR_GLOBAL_SYMBOL macro.
Diff:
---
bfd/ChangeLog | 5 +++++
bfd/elf32-arc.c | 9 +++++++++
2 files changed, 14 insertions(+)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f746908..9ee1bf4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
+
+ * elf32-arc.c (elf_arc_relocate_section): Added "call" to
+ RELOC_FOR_GLOBAL_SYMBOL macro.
+
2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
* elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
index b1a1697..f424f13 100644
--- a/bfd/elf32-arc.c
+++ b/bfd/elf32-arc.c
@@ -1412,6 +1412,7 @@ elf_arc_relocate_section (bfd * output_bfd,
asection * sec;
struct elf_link_hash_entry * h2;
const char * msg;
+ bfd_boolean unresolved_reloc = FALSE;
struct arc_relocation_data reloc_data =
{
@@ -1499,6 +1500,14 @@ elf_arc_relocate_section (bfd * output_bfd,
}
else
{
+ bfd_boolean warned, ignored;
+ bfd_vma relocation ATTRIBUTE_UNUSED;
+
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned, ignored);
+
/* TODO: This code is repeated from below. We should
clean it and remove duplications.
Sec is used check for discarded sections.