This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]