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]

identifying symbol versions available to dlvsym


Hello everyone,

I am trying to determine which versions of a given symbol (in this
case, fopen) are available in a system's GNU libc for loading through
dlvsym().  How can I do that?

I thought I could get this from objdump


$ objdump -T /lib/libc-2.6.1.so |grep " fopen$"
000575f0 g    DF .text  00000032  GLIBC_2.1   fopen
000f9380 g    DF .text  00000097 (GLIBC_2.0)  fopen


but then I tried running the attached program on the two versions
listed for fopen (GLIBC_2.0 and GLIBC_2.1) and it failed

$ ./dlvsym fopen GLIBC_2.1
fp= 0
dlerror()==NULL
$ ./dlvsym fopen GLIBC_2.0
fp= 0
dlerror()==NULL

Through "brute-force"ing version numbers, I identified the version
GLIBC_2.2.5 as available on this system:

$ ./dlvsym fopen GLIBC_2.2.5
fp= 1772397760
dlerror()==NULL

But then I have another system with an earlier GNU libc version
(2.3.5) in which objdump lists the same symbol versions yet I can only
load fopen version GLIBC_2.1 using dlvsym.

What is the correct way to identify which versions of a given function
I can load with dlvsym?

Thank you for any help

Manuel


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