This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Statically linking against glibc
- From: Sam Varshavchik <mrsam at courier-mta dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Wed, 28 Dec 2005 22:35:41 -0500
- Subject: Statically linking against glibc
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?
Attachment:
pgp00000.pgp
Description: PGP signature