On 10 Dec 2020 at 23:03, Michael Hennebry wrote:

Date sent:            Thu, 10 Dec 2020 23:03:19 -0600 (CST)
From:                   Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu>
To:                       Community support for Fedora users <users@lists.fedoraproject.org>
Subject:               Re: which symbols came from which library?
Send reply to:      Community support for Fedora users <users@lists.fedoraproject.org>

> On Thu, 10 Dec 2020, Samuel Sieb wrote:
>
> > On 12/10/20 7:47 PM, Michael Hennebry wrote:
> >> Using gcc 10.2.1 -g -O, I compiled and linkeds
> >> a program using multiple libraries.
> >> Some symbols are defined by more than one library.
> >
> > That sounds like a really bad situation.
>
> One library is supposed to be a new improved
> version of parts of the other library.
> My understanding is that when shared libraries are involved,
> the rules can get complicated.
> That I'm a newbie with these libraries does not help either.
>
> >> I would like to discover which symbols came from which library.
> >> What, if anything, is the incantation to do that?
> >
> > Your question is not very clear.  If you want to see the symbols in a
> > particular library, I think "nm" is the tool for that.
>
> If symbol fred is defined in library G as well as library in B,
> I'd like to know which symbol my executable picked up.
> nm does not do that.

Looked at nm output on one of my recent programs and it seems to include the library for the symbols, but don't know if any would appear in multiple libraries...
https://stackoverflow.com/questions/54050014/in-c-program-what-happens-when-same-function-is-defined-in-two-different-librari

talks about some compiler options, but you need to know what symbols are:
gcc -o prog main.o libyz.a -Wl,-trace-symbol=foo,-trace-symbol=bar

Also talks about strong and weak definitions. Perhaps it might have info..


>
> --
> Michael   hennebry@web.cs.ndsu.NoDak.edu
> "Sorry but your password must contain an uppercase letter, a number,
> a haiku, a gang sign, a heiroglyph, and the blood of a virgin."
>                                                               --  someeecards
> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-leave@lists.fedoraproject.org
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org