This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]