delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/25/07:55:28

Date: Tue, 25 Aug 1998 14:53:11 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Thomas Nyberg <thomas DOT nyberg AT usa DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: What does __main do???
In-Reply-To: <6rpug4$1hf$1@zingo.tninet.se>
Message-ID: <Pine.SUN.3.91.980825145145.7520N-100000@is>
MIME-Version: 1.0

On Sun, 23 Aug 1998, Thomas Nyberg wrote:

> When you compile with asm-output ex. gcc -S test.c you there's a call to a
> function called ___main (or__main), my question is: what does it do?

It calls static constructors, which are constructors for static C++ 
objects, and any functions that were declared with 
__attribute__((constructor)).

- Raw text -


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