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
On Wed, Oct 16, 2002 at 12:24:12AM -0700, Kaz Kylheku wrote:
> 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.
My sglibc can do that. But it is kind of old:
https://sourceforge.net/projects/sglibc/
I haven't had time to update it.
H.J.