This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: identifying symbol versions available to dlvsym


Nick, Jakub: Thank you for your help! I will update libtrash to use
the @@ version instead of the first one listed.

All the best

Manuel



On Dec 21, 2007 11:33 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Dec 21, 2007 at 04:22:41PM +0000, Nick Clifton wrote:
> >   I am sorry that it has taken so long for us to reply to your posts.
> >
> > >OK, so some experimentation and additional searching showed me that
> > >GNU libc's fopen does not necessarily reside on /lib/libc.so.6. By
> > >looking into a different shared lib, one reads
> > >
> > >$ readelf -s /lib64/libc.so.6 |grep " fopen@"
> > >   162: 000000000005f4c0    10 FUNC    GLOBAL DEFAULT   12
> > >   fopen@@GLIBC_2.2.5
> > >
> > >which is precisely the version number that works with dlvsym().
> > >
> > >How could I have found this programatically? To identify the version
> > >of fopen being used, can I do better than
> > >
> > >1) running ldd on an executable containing a call to fopen();
> > >2) run readelf -s | grep fopen on each of the libs listed; and
> > >3) using the first version string I find in 2) in my calls to dlvsym?
>
> Well, usually you don't want the first version, but the default version (the
> one with @@ instead of just @), because that matches the headers of the
> library and what you'd normally get if you directly linked against the
> library rather than using dlvsym.
>
>         Jakub
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]