Statically linked binary way way too big

Kaz Kylheku kaz@ashi.footprints.net
Wed Oct 16 00:24:00 GMT 2002


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.



More information about the Libc-alpha mailing list