On 13-Nov-2008, at 10:17 PM, Valeriy E. Ushakov wrote:
On Fri, Nov 14, 2008 at 14:00:55 +1100, Geoff Wing wrote::> 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
The #ifdef support for MK_YP and USE_YP (as well as MK_HESIOD and USE_HESIOD) has always been haphazard at best. In the past (1.3, 1.6) I've "fixed" the relevant sources to be more careful and to properly remove that all the unnecessary code entirely if one chooses to compile without it using those Make options. I haven't tried recently to pull my changes forward though -- there's been a lot of code churn in some areas, though sadly none of it really helps this particular situation so some fixes and changes are still necessary.
I don't remember the exact numbers, but I seem to recall that my patches eliminate an enormous amount of object code (over 100kb?) in every static binary that uses passwd(5) in any way on systems that don't ever need or want YP or HESIOD.
What about RPC stuff, etc.?
Which routines or chunks of code are you referencing here?
Ah, current. Sorry I missed that. cc -Wl,--print-map ... will tell you the dependencies. I have here handy only sh3 machines running -current and from a quick glance I guess that stack protector stuff pulls in syslog, and jemalloc pulls in sysctl'ified sysconf and from there hell kinda break loose :)
Syslog shouldn't be too bad, though it shouldn't be used if the stack protector option is disabled; but the rest doesn't sound like so much fun!
-- Greg A. Woods; Planix, Inc. <woods%planix.ca@localhost>
Description: This is a digitally signed message part