This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb/binutils-2_28-branch] Fix handling of relocations against common symbols on AArch64.
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 13 Jun 2017 14:58:14 -0000
- Subject: [binutils-gdb/binutils-2_28-branch] Fix handling of relocations against common symbols on AArch64.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fcc15c89c356c73c94581dd524d0b9ca596014b1
commit fcc15c89c356c73c94581dd524d0b9ca596014b1
Author: James Clarke <jrtc27@jrtc27.com>
Date: Tue Jun 13 15:55:02 2017 +0100
Fix handling of relocations against common symbols on AArch64.
PR ld/19579
* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
ELF_COMMON_DEF_P for common symbols.
Diff:
---
bfd/ChangeLog | 10 ++++++++++
bfd/elfnn-aarch64.c | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5c02f54..7d74169 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,13 @@
+2017-06-13 Nick Clifton <nickc@redhat.com>
+
+ Import this fix from the mainline sources:
+
+ 2017-06-06 James Clarke <jrtc27@jrtc27.com>
+
+ PR ld/19579
+ * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
+ ELF_COMMON_DEF_P for common symbols.
+
2017-06-07 Nick Clifton <nickc@redhat.com>
Import this fix from upstream:
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index d632b3c..a92c0f3 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -8903,7 +8903,7 @@ elfNN_aarch64_finish_dynamic_symbol (bfd *output_bfd,
}
else if (bfd_link_pic (info) && SYMBOL_REFERENCES_LOCAL (info, h))
{
- if (!h->def_regular)
+ if (!(h->def_regular || ELF_COMMON_DEF_P (h)))
return FALSE;
BFD_ASSERT ((h->got.offset & 1) != 0);