From: James Clarke Date: Tue, 13 Jun 2017 14:55:02 +0000 (+0100) Subject: Fix handling of relocations against common symbols on AArch64. X-Git-Tag: users/ARM/embedded-binutils-2_28-branch-2017q2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fcc15c89c356c73c94581dd524d0b9ca596014b1;p=thirdparty%2Fbinutils-gdb.git 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 --git a/bfd/ChangeLog b/bfd/ChangeLog index 5c02f54e29e..7d7416941fd 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,13 @@ +2017-06-13 Nick Clifton + + Import this fix from the mainline sources: + + 2017-06-06 James Clarke + + PR ld/19579 + * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check + ELF_COMMON_DEF_P for common symbols. + 2017-06-07 Nick Clifton Import this fix from upstream: diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index d632b3c3f5d..a92c0f3c2d7 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);