I'm trying to do the following in my linker cmd file, in the SECTIONS area.
/* RAM_L ****************************************************************************/
RAM_Ts : run = 0x008000 page 0 RUN_START (_RAM_L_START_LABEL)
.ebss : run = RAM_L page 0 RUN_START (ebssStart)
RAM_Dma : run = RAM_L(HIGH) page 0 RUN_END (_RAM_L_END_LABEL)
{ _RAM_L_SIZE = _RAM_L_END_LABEL - _RAM_L_START_LABEL; }
When I do this, the computation works fine (_RAM_L_SIZE is computed correctly as 008000), but I get the following warning:
warning: section relative symbols from different output sections cannot be mixed; "_RAM_L_START_LABEL" is in section "RAM_Ts", "_RAM_L_END_LABEL" is in section "RAM_Dma"
This doesn't make sense to me, because I don't see how those symbols are section relative. _RAM_L_START_LABEL is 008000, and _RAM_L_END_LABEL is 010000. If they were relative, _RAM_L_START_LABEL would be 0, and _RAM_L_END_LABEL would be whatever the size of the RAM_Dma section is. Also, the warning says the symbols cannot be mixed, yet they are being mixed and computed correctly.
Also, in SPRU514C (TMS320C28x Assembly Language Tools v5.0.0), there is an example that shows the following:
GROUP
{
outsect:
{
start_of_outsect = .;
}
dummy: { size_of_outsect = . - start_of_outsect; }
}
If I try linking this, I get the same warning:
warning: section relative symbols from different output sections cannot be mixed; "start_of_outsect" is in section "outsect", "DOT operator" is in section "dummy"
Is there a way around this, or a better way to do it? Can the warning be inhibited? My sections aren't contiguous, so I can't put them in a GROUP statement. I know I can compute the size at run time, but that seems silly when the value is obviously known at link time.
Thanks.