This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Statically linked binary way way too big
- From: Kaz Kylheku <kaz at ashi dot footprints dot net>
- To: Denis Vlasenko <vda at port dot imtp dot ilyichevsk dot odessa dot ua>
- Cc: "Martin v. Loewis" <martin at v dot loewis dot de>, <libc-alpha at sources dot redhat dot com>
- Date: Wed, 16 Oct 2002 00:24:12 -0700 (PDT)
- Subject: Re: Statically linked binary way way too big
On Wed, 16 Oct 2002, Denis Vlasenko wrote:
> On 16 October 2002 03:54, Martin v. Loewis wrote:
> > > int main() {
> > > return 0;
> > > }
> > >
> > > Based on release announcements ("we don't want
> > > to hear about size") and discussions with Linus
> > > seen in archive I know that glibc does not try
> > > to minimize library size, but nearly half a megabyte
> > > can never be right.
> >
> > Why do you say this? How do you determine which size would be right,
> > and which would not?
>
> Say that again? It's ok for this program to occupy 400k?
Based on the relative frequency of static versus dynamic linking,
I'd say that it's irrelevant how big or small a static binary is.
Dynamic linking amortizes the library size over hundreds and hundreds
of programs in your system. I don't think anyone cares about minimizing
the dependencies so that a trivial main() { } won't pull in anything.
Minimizing static footprints was important on systems with poor or
nonexistent dynamic linking systems.