This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: The future of __main (was Re: __main call for c++ on sparc-elftarget)
- From: Chris Lattner <sabre at nondot dot org>
- To: Jim Wilson <wilson at tuliptree dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 26 Jun 2003 13:32:07 -0500 (CDT)
- Subject: Re: The future of __main (was Re: __main call for c++ on sparc-elftarget)
On 26 Jun 2003, Jim Wilson wrote:
> Some of your criticisms of init/fini are fixed by the follow on
> init_array/fini_array ELF sections. init/fini contain code, but
> init_array/fini_array are just lists of function addresses. They are
> similar to the ctor/dtor lists we have now, except that the code that
> runs them is now in the loader instead of in the program. I think that
> solves most of your size problem. It also makes them more transparent
> to a whole program optimizer. See the ELF standard for more info.
Interesting: this sounds exactly like what we are doing in LLVM (building
arrays of function address/priority pairs, instead of code). I wasn't
aware of this work, I'll definately take a look!
Thanks!
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/