Functions in RAM

David Mc Kenna mckennad@esatclear.ie
Thu Apr 8 21:16:00 GMT 2004


Hi all,

Is it possible to write functions in C that will be copied into RAM at programme
startup? Initialised variables are copied into RAM at startup using startup
code.

I believe this may be done by defining a new section within the linker script
and then using the section function attribute within gcc to place the function
within the section and then copy this section into RAM at startup also. But
I have not being able to do this.

Any help is appreciated.

Thanks,
Dave McKenna
--
http://www.iol.ie



More information about the Gcc mailing list