This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: where is gccmain


> Hi,
>     When I assemble a simple C program, there is a call to __gccmain. Does any one know where this is located. Is it somewhere in libgcc.a? 

Yes.

>Also does this __gccmain call the _init function in order to call 
constructor of static objects and also registers _fini with __atexit to 
call their destructors or does this calling of _init and registering of 
_fini has to be done in crt0.S as it is done in the default crt0.S build 
for newlib. I am using a gcc toolchain for xscale.

Normally, if your compiler is using __gccmain it won't be using init and 
fini (and vice-versa).  The two different ways of achieving the same 
effect.

R.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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