This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is there something like sizeof(function) ?

Note: This was originally posted on 7th May 2009 at http://forums.arm.com

I want to do IAP (In-Application Programming). In order to do this, I will copy several C functions from IROM to IRAM and then execute them there. If there was a sizeof operator for functions than it would be trivial but AFAIK there is none.

To accomplish this, I have created dummy start_of_module & end_of_module marker functions to get addresses of them. That way, I can calculate the size of the module and copy all of functions and find their relative addresses, but I noticed that the compiled functions may be ordered different than they appear in source code. I see this by reading the assembly listing of the module.

Some functions are static but that is all there is...

Any info/suggestion , linker hack , whatever ?

Thanks In Advance...

EOT
0