Red Hat Bugzilla – Bug 240641
Functions/global text symbols are missing from libresolv.so ???
Last modified: 2016-11-24 09:54:31 EST
Description of problem:
Some of the functions/global text symbols found in "libresolv.a" are missing in
"libresolv.so" (in my case "ns_put16").
Version-Release number of selected component (if applicable):
> cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
> uname -srvmpio
Linux 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64 x86_64 x86_64
Steps to Reproduce:
1.Run the following script
trap 'rm $logs' 0 1 2 15
for x in /usr/lib/libresolv.a /usr/lib/libresolv.so ; do
print " $x:"
nm $opt $x | sed -ne 's,^.* T ,,p' | sort
sdiff -w79 $logs
The "ns_put16" and "ns_put32" functions are in "libresolv.a" but not in
"libresolv.so". "libresolv.so" from at least some of the earlier OS releases is
missing the "ns_get32" function also. The "ns_get16" function is the only one
common to all.
All four should be there. Don't know about the other `missing' symbols.
FWIW - this is not specific to the Redhat Enterprise OS. The same problem
exists on Debian and SuSe OSs also. I don't have access to any others. A
simple minded workaround is to use "-Wl,-Bstatic -lresolv -Wl,-Bdynamic" when
you link via the `gcc' compiler.
That's normal, those are just libresolv's private functions, you shouldn't use
them at all. glibc is using symbol versioning to export only symbols it wants