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.