Statically linking against glibc
Sam Varshavchik
mrsam@courier-mta.com
Thu Dec 29 03:35:00 GMT 2005
gcc emits the following diagnostic after statically linking an app:
"warning: Using 'getpwnam' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking".
I'd like to understand the underlying reason for this requirement, for my
own enlightement. I can make a couple of guesses:
1) getpw()/getgr() needs to read nsswitch.conf, which is typically packaged
together with libc.so
2) Even the static libc.a dlopens various /lib/libnss_*.so to handle
getpw()/getgr() requests.
Is this it, or are there other reasons for this?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20051229/a44fc5e5/attachment.sig>
More information about the Libc-alpha
mailing list