Can the ARM compiler-linker produce relocatable object code? That is, the code may be executed from anywhere in memory because it has no absolute program memory references - all is relative to PC.
Did you look at all the options you can check in the project dialogs?
Yes, I can see that there are tick-boxes for RW and RO sections, but do these refer only to variables? Can I make the entire object file position independent?
I have not actually comitted to using Keil at this stage and I dont have a system to play with.
Please see here: infocenter.arm.com/.../armcc_bcfjjdfj.htm
and here: infocenter.arm.com/.../armccref_chdcdggg.htm
--apcs=/ropi (through µVision target settings dialog "C/C++ -> Read-Only Position Independent")
In ARM nomenclature, RO includes RO-CODE as well as RO-DATA.
Regards Marcus http://www.doulos.com/arm/
Thanks for the links.
In short then, position independent code is only possible for a subset of C and not at all for C++.