Bug 240641

Summary: Functions/global text symbols are missing from libresolv.so ???
Product: Red Hat Enterprise Linux 4 Reporter: Paul Townsend <aab>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: aab, fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-21 19:14:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Townsend 2007-05-19 04:29:23 UTC
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):

libresolv.so.2

> 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
GNU/Linux

How reproducible:
Always.

Steps to Reproduce:
1.Run the following script

#!/bin/ksh
trap 'rm $logs' 0 1 2 15
uname -srvmpio
opt="-g"
for x in /usr/lib/libresolv.a /usr/lib/libresolv.so ; do
  log=${x##*/}
  log=/tmp/${log%.*}_${log#*.}
  logs="$logs $log"
  {
    print " $x:"
    nm $opt $x | sed -ne 's,^.* T ,,p' | sort
  } >$log
  opt="-D"
done
sdiff -w79  $logs

  
Actual results:
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.

Expected results:
All four should be there.  Don't know about the other `missing' symbols.

Additional info:
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.

Comment 1 Jakub Jelinek 2007-05-21 19:14:58 UTC
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
to export.