I try to calculate section length in the linker.cmd as follow and I got warning #10272-D: warning #10272-D: section relative symbols from different output sections cannot be mixed; "__text_run" is in section ".text", "__text_run" is in section ".pinit"
GROUP : > PRAML0, PAGE = 1
{
.text
{
__text_run = . ; /* GET RUN ADDRESS */
*(.text) /* ALLOCATE .econst */
}
IQmath /* IQ math functions */
.pinit
{
__text_length = .- __text_run; /* COMPUTE LENGTH */
}
}
Can anyone tell me what is the proper way to do it?
There is an example in (spru513g) TMS320C28x Assembly Language Tools v6.2.4 User's Guide Section 8.5.10.6 as below, and I can not see the difference between my code and the example. Any help will be greatly appreciated.
GROUP
{
outsect:
{
start_of_outsect = .;
...
}
dummy: { size_of_outsect = . - start_of_outsect; }
}