From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29991 invoked by alias); 1 Sep 2002 20:40:50 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 29982 invoked from network); 1 Sep 2002 20:40:49 -0000 Received: from unknown (HELO smtp-relay01.tc.dsvr.net) (212.69.192.4) by sources.redhat.com with SMTP; 1 Sep 2002 20:40:49 -0000 Received: from [212.69.196.146] (helo=dedicated2.dsvr.co.uk) by smtp-relay01.tc.dsvr.net with esmtp (Exim 3.33 #3) id 17lbWb-0002Ea-00 for gcc@gcc.gnu.org; Sun, 01 Sep 2002 21:40:49 +0100 Received: from zarquin (host217-39-228-176.in-addr.btopenworld.com [217.39.228.176]) by dedicated2.dsvr.co.uk (8.11.6/8.11.6) with SMTP id g81Ken731000 for ; Sun, 1 Sep 2002 21:40:49 +0100 Message-ID: <002501c251f7$df13bd60$0a00000a@zarquin> From: "Robert Spanton" To: References: <002f01c24f89$6ad6efa0$0a00000a@zarquin> <20020830044008.A479336@murlibobo.cs.mu.OZ.AU> <001e01c24fe4$f4b6e580$5aa80844@fed1.sdca.home.com> <20020901160425.GA13739@ceres.cs.mu.oz.au> <001901c251f4$5cd6db50$5aa80844@fed1.sdca.home.com> <000501c251f5$8ad6b740$5aa80844@fed1.sdca.home.com> Subject: Re: __main Date: Sun, 01 Sep 2002 13:40:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2002-09/txt/msg00009.txt.bz2 When I compile some code under windows it outputs __main, but when I compile it under linux I don't get it - does anyone know why? Robert www.xgoat.com ----- Original Message ----- From: "Mike Laman" To: "GCC" Sent: Sunday, September 01, 2002 9:24 PM Subject: Re: __main > I tried it. I still get the __main call. > > Any other ideas? > > I do appreciate the help and time! Tks, > Mike > > ----- Original Message ----- > From: "Mike Laman" > To: "GCC" > Sent: Sunday, September 01, 2002 1:15 PM > Subject: Re: __main > > > > I'm trying very hard not to modify the source. > > > > I've got to think that others porting GCC to small chips will have the > > same issue. For me space is very important. Unfortunately, the bytes > count. > > > > Also the standard assembler for this chip does not accept an "_" for > > the first character. Don't look at me - I didn't write it, but I do need > to > > interface with it. > > > > I'll give -ffreestanding a try. > > > > Thanks, > > Mike > > ----- Original Message ----- > > From: "Fergus Henderson" > > To: "Mike Laman" > > Cc: "GCC" > > Sent: Sunday, September 01, 2002 9:04 AM > > Subject: Re: __main > > > > > > > On 29-Aug-2002, Mike Laman wrote: > > > > When running a C cross compiler where one does not want a call > > > > to "__main()" to be emitted, how can one turn it off? > > > > > > I don't know off-hand if it can be turned off. > > > (I doubt if it can, but perhaps with `-ffreestanding'??) > > > Of course you can always turn it off by modifying the source code! > > > > > > Probably the easiest solution is to just define a dummy __main() > > > function that does nothing. You'd better be sure that you don't > > > link in any C++ programs or libraries, though, because they might > > > not work properly if constructors for static objects are not > > > executed. > > > > > > -- > > > Fergus Henderson | "I have always known that the > > pursuit > > > The University of Melbourne | of excellence is a lethal habit" > > > WWW: | -- the last words of T. S. > Garp. > >