(keitai-l) Re: Porting of C protocol stack on Symbian platform

From: D. Dimitrov <dimiter_at_blue-edge.bg>
Date: 09/04/04
Message-ID: <4139C4A9.2050101@blue-edge.bg>
Vinay Tiwari wrote:

>There are lot of issues those need to be addressed like global variables etc. 
>
Since the code for a lot of embedded systems has to be position 
independent, all the function calls and global variable  references have 
to be made indirectly. On "normal" OS-es, the linker creates a Global 
Offset Table which contains relative offsets. When the dynamic library 
loader loads the module, these are translated into real addresses used 
to access the data. The rason for the no statics rule is that in Symbian 
(also in BREW) applications, the code segment is in the flash RAM and is 
considered read-only, also you can't have data segment so you can't have 
a GOT.  You can have static constants, which are resolved at compile 
time. In many cases you can also use thread local variables for the same 
purposes that you would normally use statics.

>Can someone direct me to some case study or some good resource that explains about all
>such details. 
>
http://www.amazon.com/exec/obidos/tg/detail/-/186100303X/104-0894475-6017500?v=glance
http://www.symbian.com/developer/
http://newlc.com/

>Is it necessary to write the stack in C++  from C ?
>  
>
You can use your C code as long as it follows the rules (i.e. no static 
variables, no large objects on the stack, no deep recursion, etc.)


-- Dimitar
Received on Sat Sep 4 16:35:44 2004