Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Sep 1996 23:57:19 -0700
From:      David Greenman <dg@root.com>
To:        Julian Elischer <julian@whistle.com>
Cc:        current@freebsd.org
Subject:   Re: BLOAT in minimal programs 
Message-ID:  <199609260657.XAA00299@root.com>
In-Reply-To: Your message of "Wed, 25 Sep 1996 23:30:14 PDT." <324A22F6.167EB0E7@whistle.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>David Greenman wrote:
>> 
>> ...
>> >THIS IS NOT MINIMAL!
>> >I DID NOT WANT ALL THIS CRAP!
>> >why oh why did I get malloc?
>> 
>>    Because atexit() uses it to remember exit callouts (see crt0.c).
>so why isn't atexit in libc?

   It is.

>I certainly didn't call it..
>of course I haven't checked.. it might well be there..

   Sorry, I meant it was called from crt0.c. Actually, if you're building your
program static the call shouldn't be made if things are being built using
scrt0.o like they are supposed to be (the call to atexit() is in crt0 is not
made for the !MCRT0 && !DYNAMIC case).

>> >vfprintf?
>> >__CurrentRuneLocale ?
>> >hell it doesn't even contain a STRING let alone a default nationality!
>> 
>>    I think this is all because malloc (or something in crt0.c) calls a stdio
>> funtion like printf either directly or indirectly via a perror() or equivilent.
>> Of course Runes comes in because of vfprintf, etc, etc.
>
>
>so do we have a way of telling cc to link with a more sensible crt0?
>surely we can do something..

   We already do. Perhaps the calls are coming from somewhere else...

-DG

David Greenman
Core-team/Principal Architect, The FreeBSD Project



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609260657.XAA00299>