]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix handling of relocations against common symbols on AArch64.
authorJames Clarke <jrtc27@jrtc27.com>
Tue, 13 Jun 2017 14:55:02 +0000 (15:55 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 13 Jun 2017 14:55:02 +0000 (15:55 +0100)
PR ld/19579
* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
ELF_COMMON_DEF_P for common symbols.

bfd/ChangeLog
bfd/elfnn-aarch64.c

index 5c02f54e29e671a47536bea577d30a11defe2c3a..7d7416941fdc0039a572b57f1de8df8e407f3291 100644 (file)
@@ -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:
index d632b3c3f5d563b6dc5ba6712fbb7388e7a748ac..a92c0f3c2d7d0f9673fdd259c5f81570b6e1e165 100644 (file)
@@ -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);