Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Oct 2002 15:01:59 -0800
From:      Peter Wemm <peter@wemm.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        Nate Lawson <nate@root.org>, current@freebsd.org
Subject:   Re: libc size 
Message-ID:  <20021030230159.48A832A88D@canning.wemm.org>
In-Reply-To: <3DC060DB.EF58A009@mindspring.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:
> Peter Wemm wrote:
> > Terry Lambert wrote:
> > > Nate Lawson wrote:
> > > > Here is a link to the size of various components of libc, sorted by tex
    t
> > > > size.  If you can find some way to reduce or even remove some of this,
> > > > please submit a patch.
> > > >
> > > >   http://www.root.org/~nate/freebsd/lib_size.out
> > >
> > > Move the resolver code out to ibresolv.so, and link libc.so
> > > against libresolv.so so that legacy applications are happy, as
> > > long as they are compiled shared.  Non-network apps can ignore
> > > most of it.  Internal use of some of the biggest chunks is
> > > limited, so this should avoid dragging in a lot of it.
> > 
> > We've been over this before.  To make this work right, we need to make
> > /bin and /sbin dynamically linked.  NetBSD's /rescue/* approach would
> > solve the "oops!" and other foot shooting problems.
> 
> Or add:
> 
> 	LDFLAGS+=	-lresolv
> 
> To the Makefiles of the things that need to be statically linked,
> and access the network code.

Except that getpwent() etc have got hard coded references to yp, and yp has
got hard coded references to getXXXbyYYY(), which has references to
libresolv.  The number of things that are infected by this is quite big.
This means a good number of things in /bin and /sbin would have to have
-lresolv added.  And that defeats the point.  All that we do is move
the bloat from one library to another.

It's the same problem with the db embedded in there - getpwent() uses
it via the pwd.db stuff.  And then there's the cgetent() stuff that
that *curses uses to access termcap.db. And login.conf.db. And so on.

> I'm going to go out on a limb here, though, and guess that without
> a resolv.conf, most of the resolver library is going to be really
> useless.  8-) 8-).

Except to satisfy internal dependencies.

> -- Terry
> 

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021030230159.48A832A88D>