From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11206 invoked by alias); 15 Oct 2002 12:15:27 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 11160 invoked from network); 15 Oct 2002 12:15:26 -0000 Received: from unknown (HELO skynet.stack.nl) (131.155.140.225) by sources.redhat.com with SMTP; 15 Oct 2002 12:15:26 -0000 Received: from turtle.stack.nl (turtle.stack.nl [2001:610:1108:5010:202:b3ff:fe17:a070]) by skynet.stack.nl (Postfix) with ESMTP id EF520405C for ; Tue, 15 Oct 2002 14:15:34 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1663) id C912E2E; Tue, 15 Oct 2002 14:15:25 +0200 (CEST) Date: Tue, 15 Oct 2002 05:15:00 -0000 From: Michiel Buddingh' To: gcc-help@gcc.gnu.org Subject: Re: Giant executables.. what am I doing wrong? Message-ID: <20021015121525.GB42231@stack.nl> References: <20021014234939.GA35014@stack.nl> <003d01c273de$f0768bb0$0100a8c0@windows9q3yn19> <20021015002144.GA35401@stack.nl> <004d01c273e2$af2f48f0$0100a8c0@windows9q3yn19> <20021015014958.GA36140@stack.nl> <15787.57861.139804.37266@wh2-19.st.uni-magdeburg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15787.57861.139804.37266@wh2-19.st.uni-magdeburg.de> User-Agent: Mutt/1.4i X-SW-Source: 2002-10/txt/msg00189.txt.bz2 On Tue, Oct 15, 2002 at 11:38:13AM +0200, Claudio Bley wrote: > Of course, write(2) is a system call, but nonetheless you need an > entry point somewhere to call that function from your program. That's > why gcc links in the C library which defines write as a weak symbol > (at least on my machine). Then again, 332 kB seems a lot of overhead for adding something like an entry point. I'm starting to get the idea that this problem is related to my gcc installation. Compiling the same program on a FreeBSD system using gcc 2.95 leaves me with an executable of 15 kB. Still rather hefty, but a lot better. -- -- Michiel