Graham Moss

Best use of .bss and other sections

Discussion created by Graham Moss on May 25, 2009
Latest reply on Jun 5, 2009 by CrasyCat

Hi All,

We now have a CodeWarrior version of our startup file which is pleasing progress.


Now I need to get my head around the .bss, .data and the use of sections in general.


If I am right .data is a directive to the linker as to which memory section to place the variable in. This name also ripples through to the ELF file for debugging.


Does this mean that I need to specify the memory section in my source file so every variable is specifically located?


Would the same apply to code or is .text assumed for executable code?


I have read the description in the 'targeting_embedded_68K_Coldfire' documentation but the examples don't extend to real code usage.


Any comments welcome,