[I'll reply to
./23 later because it's long.]
PpHd (./25) :
Because of the fact that we are talking about a Flash Os which should assume that the RAM is not initialized when it boots and its job to initialize everything,
I don't think it is possible to initialize a value stored in .data for a flash os, in a simple way; and I even don't know if it has a meaning.
Even if we put an option to put the .data section in RAM, it won't work without the help of the written OS so what can we do? Maybe duplicating the data in RAM and in flash, and let the OS initialize it with the requested values at startup by exporting additional symbols by the linker?
That's yet another reason why
flashos.a should contain some common initialization code (which would also initialize the hardware), an idea which you are vehemently against for no particular reason.