Hi Alex,
Sorry, I don't know where this is documented. Perhaps the following explanation would help?
(1) The .text section contains your program's executable instructions
(2) The .rodata section contains any read-only data. For example, in C you could write:
const int myconstant = 0x1234;
The compiler would place 'myconstant' in the .rodata section. It will also place string data in this section if you set CodeWarrior's options appropriately. For example:
printf ("Hello world\n");
The string "Hello world\n" is placed in .rodata.
Since the data in .rodata never gets modified, it's common to locate it in Flash memory along with your executable code.
(3) The .data section contains data that's modifiable by your code (i.e. non-constant data), and that is initialised with a non-zero value. For example:
int myinteger = 0x1234;
(3) The .bss section contains data that's modifiable by your code, but not initialised, or initialised to zero. For example:
char myarray [256];
(4) Now come the harder ones - .sdata and .sbss. These are the Small Data and Small BSS sections. The idea of these sections is to allow the compiler to generate more efficient code to access commonly used data items.
You can tell the compiler to place any data item which is less than a certain size into .sdata or .sbss, rather than the normal .data/.bss (See the CodeWarrior 'ColdFire Processor' options pane).
The Linker Control File collects all .sdata items together into a single lump, and follows this by all the .sbss items. At runtime, the A5 register is set up to point to the mid-point - i.e. the end of the .sdata/start of .sbss. This is usually a linker-defined label called __SDA_BASE.
For an item located in the .sdata or .sbss section, the compiler generates a more efficient instruction to access it, using A5-relative addressing instead of absolute addressing. This typically reduces the instruction size by 2 bytes.
Hope this helps get you started.
Simon