actually, there is no stack initialization in __reset_vector. stack being initialized in the 'main' prologue and can be avoided with '-mno-stack-init' option. If you want, you can try to : 1. use gcc-3.4 and put some code into '.initX' sections 2. make your 'main' doing low_level_init then branch to real main. 3. do something else :)
~d On Monday 19 January 2004 15:26, Ralf Hildebrandt wrote: > I will decribe the mechanism of "__low_level_init" in detail: > Every program written in C starts with the initialisation of the stack > pointer SP. Short after this the function "__low_level_init" is CALLed. > In default case this function just gives back a return value, but the > user can redefine this function for own purpose. After the RETurn, the > normal C-preamble is computed (initialisation of global variables, > heap...). -- /***************************************************************** ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) State Polytechnical Univ. (_Y_.)' ._ ) `._ `. ``-..-' Radio-Physics Departament _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 5403923, 5585314 *****************************************************************/