Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/external/gpl3/binutils/dist/bfd Pull up following revisio...



details:   https://anonhg.NetBSD.org/src/rev/cfdc1b11f756
branches:  netbsd-8
changeset: 434833:cfdc1b11f756
user:      snj <snj%NetBSD.org@localhost>
date:      Sun Apr 08 05:54:40 2018 +0000

description:
Pull up following revision(s) (requested by joerg in ticket #698):
        external/gpl3/binutils/dist/bfd/elflink.c: 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.

diffstat:

 external/gpl3/binutils/dist/bfd/elflink.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 847b5d59b249 -r cfdc1b11f756 external/gpl3/binutils/dist/bfd/elflink.c
--- a/external/gpl3/binutils/dist/bfd/elflink.c Thu Apr 05 18:18:00 2018 +0000
+++ b/external/gpl3/binutils/dist/bfd/elflink.c Sun Apr 08 05:54:40 2018 +0000
@@ -2675,14 +2675,17 @@
      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;



Home | Main Index | Thread Index | Old Index