__main call for c++ on sparc-elf target
Brenner Joel
joel.brenner@nemerix.com
Tue Jun 24 07:52:00 GMT 2003
Hi all,
I'm using gcc 3.3 configured and built as cross compiler for
sparc-elf (binutils 2.14; newlib 1.11.0; insight 5.3 ). The problem is
that I was expecting a call
to __main just at the beginning of main in order to execute the static
class constructors placed in __CTOR_LIST__. There isn't any call to
__main inserted by gcc and even
if I call it directly from my boot code gcc tells me that __main isn't
defined. At the moment I do "manually" the call to __CTOR_LIST__ but I
thik this isn't the right way.
Why gcc does not insert the call to __main ? I suppose __main should be
in gcclib.a, but it isn't there, why?
Thanks in advance joel brenner
--
Joel Brenner -- Designer
E-mail: joel.brenner@nemerix.com
Phone: +41 91 612 46 00 -- Fax : +41 91 612 47 01
Direct: +41 91 612 47 12
www.nemerix.com
NemeriX SA Stabile Gerre 2000
PO Box 425 6928 Manno, Switzerland
----------
More information about the Gcc
mailing list