Friday, February 25, 2011

Data segment in C



Data segment in C is broadly classified in 4 sections: ".txt" , ".rodata" , ".bss" , ".data"

.rodata:The .rodata is also used for storing string constants and read only data's.
.data:The compiler places initialized and uninitialized global variables in the .data section.
.bss: A separate section called .bss is used for uninitialized variables or temporary variable in stack
.txt: Opcode i.e executable code is stored in this section.


Note:Flash content cannot be modified, it can only be erased and re-written hence code and constants are stored in flash while variables are stored in RAM.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Powered by Blogger | Printable Coupons
Design Downloaded from Free Blogger Templates | Free Website Templates