public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Mike Laman" <mlaman@cox.net>
To: "GCC" <gcc@gcc.gnu.org>
Subject: Re: __main
Date: Sun, 01 Sep 2002 13:22:00 -0000	[thread overview]
Message-ID: <000501c251f5$8ad6b740$5aa80844@fed1.sdca.home.com> (raw)
In-Reply-To: <001901c251f4$5cd6db50$5aa80844@fed1.sdca.home.com>

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" <mlaman@cox.net>
To: "GCC" <gcc@gcc.gnu.org>
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" <fjh@cs.mu.OZ.AU>
> To: "Mike Laman" <mlaman@cox.net>
> Cc: "GCC" <gcc@gcc.gnu.org>
> Sent: Sunday, September 01, 2002 9:04 AM
> Subject: Re: __main
>
>
> > On 29-Aug-2002, Mike Laman <mlaman@cox.net> 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 <fjh@cs.mu.oz.au>  |  "I have always known that the
> pursuit
> > The University of Melbourne         |  of excellence is a lethal habit"
> > WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S.
Garp.
>

  reply	other threads:[~2002-09-01 20:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-29 11:25 __main Robert Spanton
2002-08-29 11:40 ` __main Fergus Henderson
2002-08-29 22:18   ` __main Mike Laman
2002-09-01  9:04     ` __main Fergus Henderson
2002-09-01 13:14       ` __main Mike Laman
2002-09-01 13:22         ` Mike Laman [this message]
2002-09-01 13:40           ` __main Robert Spanton
2002-09-02  4:26             ` __main Lars Brinkhoff
2002-09-02  5:29           ` __main Ian Dall
2002-09-02 19:08             ` __main Mike Laman
2002-09-01 22:56         ` __main Fergus Henderson
2002-09-02  3:36           ` __main Mike Laman
2002-09-02  5:51             ` __main Fergus Henderson
2002-09-02 19:06               ` __main Mike Laman
2002-09-03 14:03                 ` __main Fergus Henderson
2002-09-03 14:21                   ` __main Neil Booth
2002-09-04  4:03                     ` __main Richard Earnshaw
2002-09-02 19:37     ` __main Zack Weinberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000501c251f5$8ad6b740$5aa80844@fed1.sdca.home.com' \
    --to=mlaman@cox.net \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).