identifying symbol versions available to dlvsym
Manuel Arriaga
manuelarriaga1980@gmail.com
Mon Dec 3 17:48:00 GMT 2007
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
More information about the Binutils
mailing list