geneSmith <gene.smith@sea.siemens.com> writes:
My question would be is how would you cause .mdata to always be located
right after the point where .data is loaded rather than at a fixed
address? In otherwords, the above SECTIONS defines things like this:
Probably the easiest way is with memory regions. The script might
look something like this (not checked for syntax, etc):
MEMORY
{
REGION1 (r) : ORIGIN = 0x1000, LENGTH = 0x....
}
SECTIONS
{
.text : { *(.text) _etext = . ; } > REGION1
.mdata : { ... } > REGION1
.bss : { ... } > REGION1
}
See the MEMORY section of the ld manual for more details.
Richard