From owner-freebsd-current Wed Sep 25 23:55:54 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA13742 for current-outgoing; Wed, 25 Sep 1996 23:55:54 -0700 (PDT) Received: from root.com (implode.root.com [198.145.90.17]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id XAA13697 for ; Wed, 25 Sep 1996 23:55:50 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by root.com (8.7.5/8.6.5) with SMTP id XAA00299; Wed, 25 Sep 1996 23:57:19 -0700 (PDT) Message-Id: <199609260657.XAA00299@root.com> X-Authentication-Warning: implode.root.com: Host localhost [127.0.0.1] didn't use HELO protocol To: Julian Elischer cc: current@freebsd.org Subject: Re: BLOAT in minimal programs In-reply-to: Your message of "Wed, 25 Sep 1996 23:30:14 PDT." <324A22F6.167EB0E7@whistle.com> From: David Greenman Reply-To: dg@root.com Date: Wed, 25 Sep 1996 23:57:19 -0700 Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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