Re: libc, smart linking, binary size(elf/a.out)

J.J. Burgess (92jjb@eng.cam.ac.uk)
Mon, 29 Apr 1996 11:17:03 +0100 (BST)


> From: "Christopher J. Shaulis" <noone@nowhere.com>
> Date: Sat, 27 Apr 1996 19:23:28 -0400 (EDT)
> Subject: Re: libc, smart linking, binary size (elf/a.out)
>
> > Hi Herbert Rosmanith; On 26-Apr-96 you wrote:
> >
> > > salam,
> >
> > Salam Aleicum...
> >
> > > surprise, surprise, on an elf-system , the binary size is 160KB !!!!
> > > on another machine, a a.out system, the binary size is 14KB.
> > > jesus christ ...
>
> If there is THAT much of a difference you are doing something VERY
> wrong. Either you are accidentaly compiling the binary static (the
> behavior of binutils changed for recent ELF utils) or you are compilng
> - -g, or you are forgetting to strip the binary, or something. There is
> going to be some size difference, but not that much.
>
> Christopher
>

I had a similar problem, all of the stuff I compiled by hand with

gcc -o foo foo.c
ldd foo
foo:
Statically linked (elf)

it was due to a missing link in /lib, corrected by

ln -s libc.so.5 libc.so

.. and then hunting around to see how many binaries had been linked
stically - yuh.

Jon Burgess