Module Name:    src
Committed By:   martin
Date:           Mon Apr  9 13:11:47 UTC 2018

Modified Files:
        src/external/gpl3/binutils/dist/bfd [netbsd-7-1]: elflink.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1595):
        external/gpl3/binutils/dist/bfd/elflink.c: revision 1.14
When trying to decide the status of a weak symbol, resolve any
indirectness first. In the case of various Qt5 libraries, __bss_start
ends up with a Qt5 version, but it has to be resolved first to match the
actual (implicit) definition. This fixes the root cause of pkg/53089.


To generate a diff of this commit:
cvs rdiff -u -r1.7.4.1 -r1.7.4.1.6.1 \
    src/external/gpl3/binutils/dist/bfd/elflink.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/binutils/dist/bfd/elflink.c
diff -u src/external/gpl3/binutils/dist/bfd/elflink.c:1.7.4.1 src/external/gpl3/binutils/dist/bfd/elflink.c:1.7.4.1.6.1
--- src/external/gpl3/binutils/dist/bfd/elflink.c:1.7.4.1	Tue Aug 12 09:36:03 2014
+++ src/external/gpl3/binutils/dist/bfd/elflink.c	Mon Apr  9 13:11:47 2018
@@ -2528,14 +2528,17 @@ _bfd_elf_fix_symbol_flags (struct elf_li
      over to the real definition.  */
   if (h->u.weakdef != NULL)
     {
+      struct elf_link_hash_entry *weakdef = h->u.weakdef;
+      while (weakdef->root.type == bfd_link_hash_indirect)
+        weakdef = (struct elf_link_hash_entry *) weakdef->root.u.i.link;
+
       /* If the real definition is defined by a regular object file,
 	 don't do anything special.  See the longer description in
 	 _bfd_elf_adjust_dynamic_symbol, below.  */
-      if (h->u.weakdef->def_regular)
+      if (weakdef->def_regular)
 	h->u.weakdef = NULL;
       else
 	{
-	  struct elf_link_hash_entry *weakdef = h->u.weakdef;
 
 	  while (h->root.type == bfd_link_hash_indirect)
 	    h = (struct elf_link_hash_entry *) h->root.u.i.link;

Reply via email to