bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbo


From: amodra at gmail dot com
Subject: [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04
Date: Tue, 02 Feb 2021 04:46:30 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=27311

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

--- Comment #6 from Alan Modra <amodra at gmail dot com> ---
What's happening here (using Michael's testcase, thanks!) is that
inlib1@@LIBFOO is seen as being a definition, triggering

          if (!add_needed
              && matched
              && definition
              && ((dynsym
                   && h->ref_regular_nonweak)
                  || (old_bfd != NULL
                      && (old_bfd->flags & BFD_PLUGIN) != 0
                      && bind != STB_WEAK)
                  || (h->ref_dynamic_nonweak
                      && (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0
                      && !on_needed_list (elf_dt_name (abfd),
                                          htab->needed, NULL))))

to pull in lib1.so.  However, inlib1@@LIBFOO is actually overridden by inlib1
from the object file.  Without symbol versioning we see inlib1 from lib1.so
setting override during the first _bfd_elf_merge_symbol call in
add_object_symbols and then this
          if (override && matched)
            definition = FALSE;
stops the non-versioned inlib1 from being considered a reason to pull in
lib1.so.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]