Unfortunate dynamic linking for everything
kientzle at acm.org
Fri Nov 21 15:59:50 PST 2003
Bruce Evans wrote:
> It obviously uses NSS. How else could it be so bloated? :
> $ ls -l /sbin/init
> -r-x------ 1 root wheel 453348 Nov 18 10:30 /sbin/init
I believe it's actually DNS, not NSS.
Pre-5.0, the resolver ballooned significantly.
A lot of the bloat in /bin and /sbin came
from the NIS functions which in turn pull in
Example: /bin/date on 5.1 is also over 450k
because of a single call to getservbyname().
Removing that one call shrinks a static /bin/date
to a quite reasonable size. (I seem to recall 80k when
I did this experiment.)
I note that /sbin/init calls getpwnam();
I expect that's where the bloat gets pulled in.
More information about the freebsd-current