[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: static linking with getgrgid follow up

From: David Stuart
Subject: Re: static linking with getgrgid follow up
Date: Wed, 02 Oct 2002 21:39:32 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020605

Actually one other question,

If I link the program on my machine, in theory that should be "the very same version of glibc that is installed", right? So why doesn't my test program run the way I expect it to?

Geoff Keating wrote:

I think it might help if you knew that when a program that uses NSS
(also, I think, iconv) is linked statically to glibc, it can still use
dynamic libraries, basically everything of the form /lib/libnss*.so.
Making these work is complicated and is guaranteed to work only if the
executable was linked with the very same version of glibc that is
installed, which is why we recommend that people do not link
executables statically if they use NSS functions.

Unfortunately, many people think that static linking will give them a
portability or security benefit, usually based on how some really old
OS behaved.  Actually, static executables are less portable (see
above) and less secure (because security problems can't be
fixed by just installing new shared libraries).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]