Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cc -static pulling in some stupid amount of stuff



On Friday 2008-11-14 05:21 +0300, uwe%stderr.spb.ru@localhost output:
:On Fri, Nov 14, 2008 at 13:12:37 +1100, Geoff Wing wrote:
:> % cc -static -o bar foo.c
:> % size bar
:>    text    data     bss     dec     hex filename
:>  326757    7284   33108  367149   59a2d bar
:> % nm bar
:> ....
:> lots of libc stuff
:> ....
:> %
:> Why did half of libc get included?
:crt0.c->exit->atexit->...

Yes, I wasn't questioning why some of it was included.

It used to go to 60-70KB.  nm on a simple binary gave ~300 lines.
nm on a current binary gives an extra 1000+ lines and includes lots
of things which, to my eye, look completely unnecessary.

Why are things like NIS stuff getting included?  e.g.  _yp_bind, _yp_check
What about RPC stuff, etc.?

Regards,
Geoff


Home | Main Index | Thread Index | Old Index