Variable initialisation in a ROM based system
Robert Spanton
rob@xgoat.com
Mon Feb 17 19:57:00 GMT 2003
I think that it's the _start() function that's called first - you can
find more about it at
http://www.acm.uiuc.edu/sigops/roll_your_own/1.compile.intel.html .
Erik Christiansen wrote:
> When using other compilers, a function (e.g. rcopy) is called prior
>to main(), to initialise variables, using data from ROM.
>
> Is there some standard way for gcc?
>
> There might be something in the newlib that I've just compiled, but:
>
>nm -s /usr/local/src/more_path/powerpc-linux/lib/*.a | grep rcopy
>
>shows nothing.
>
> While http://sources.redhat.com/newlib is inaccessible, I'm working
>around the problem by separating declarations from initialisations, so
>the latter are done explicitly by in-line code. Now for the real fix.
>
> Any hints gratefully grabbed! :-)
>
>Regards,
>Erik
>
>
>
More information about the Gcc-help
mailing list