Bug 240641 - Functions/global text symbols are missing from libresolv.so ???
Summary: Functions/global text symbols are missing from libresolv.so ???
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc
Version: 4.5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-05-19 04:29 UTC by Paul Townsend
Modified: 2016-11-24 14:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-05-21 19:14:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.