From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2217 invoked by alias); 14 Oct 2002 23:49:40 -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 2210 invoked from network); 14 Oct 2002 23:49:40 -0000 Received: from unknown (HELO mailhost.stack.nl) (131.155.140.140) by sources.redhat.com with SMTP; 14 Oct 2002 23:49:40 -0000 Received: from turtle.stack.nl (turtle.stack.nl [2001:610:1108:5010:202:b3ff:fe17:a070]) by mailhost.stack.nl (Postfix) with ESMTP id 730F3A300E for ; Tue, 15 Oct 2002 01:49:39 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1663) id 51C1F2E; Tue, 15 Oct 2002 01:49:39 +0200 (CEST) Date: Mon, 14 Oct 2002 16:49:00 -0000 From: Michiel Buddingh' To: gcc-help@gcc.gnu.org Subject: Giant executables.. what am I doing wrong? Message-ID: <20021014234939.GA35014@stack.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2002-10/txt/msg00174.txt.bz2 I'm currently trying to write a program for a linux system with limited memory, and as such I'd like gcc to generate small, statically linked executables. However, if I compile even a simple program like: int main() { write(2,"Hello world.\n", 13); return 0; } with the --static option, then strip it with "--strip-all" I get a program worth 332 kB(!). Needless to say, this is not exactly what I want. I have tried both gcc 2.95 and gcc 3.2, but the results differ only by a few bytes. Am I missing something really obvious here? -- -- Michiel