delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/07/01:22:52

Mime-Version: 1.0
To: Yoav Shadmi <yoav AT nettaxi DOT com>, djgpp AT delorie DOT com
From: Nate Eldredge <nate AT cartsys DOT com>
Subject: Re: ___main() ?
Date: Sat, 6 Jun 1998 22:18:20 -0700
Message-ID: <19980607051814.AAB17825@ppp124.cartsys.com>

At 11:25  6/5/1998 +0300, Yoav Shadmi wrote:
>Hello
>
>	I noticed that djgpp's object make an external reference to
>	function ___main().  Just wondering why it does that, and what
>	is this ___main() function all about.

Use the source, Luke! src/libc/crt0/_main.c.

It sets a flag that tells the program it's been loaded (strange programs
like Emacs that write their memory image as an executable need this), and
also runs constructors.

Nate Eldredge
nate AT cartsys DOT com



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019