Re: which symbols came from which library?

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

 



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@xxxxxxxxxxxxxxxxxxxxx>
To:                       Community support for Fedora users <users@xxxxxxxxxxxxxxxxxxxxxxx>
Subject:               Re: which symbols came from which library?
Send reply to:      Community support for Fedora users <users@xxxxxxxxxxxxxxxxxxxxxxx>

> 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@xxxxxxxxxxxxxxxxxxxxx
> "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@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxxxxxxxxxx

  
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux