Can a symbol be defined by the linker using the RUN_SIZE() operator and also used to create a hole in an output section.?
I tried the example below and got a linker error " the symbol is used before it is assigned a value."
Is there a way to avoid this condition?
Example:
SECTIONS
{
UNION:
{
App1Objects: align(4) /* 1st output section */
{
Text11.obj(.text)
...
Text1N.obj(.text)
} load=FLASH, RUN_SIZE(_sizeOfApp1), table(_App1_copy_table)
App2Objects: align(4), fill = 0000h /* 2nd output section */
{
. += sizeOfApp1; /* Offset for this table */
Text21.obj(.text) /* Linked in after the hole */
...
Text2N.obj(.text)
} load=FLASH, RUN_SIZE(_sizeOfApp2), table(_App2_copy_table)
App3Objects: align(4), fill = 0000h /* 3rd output section */
{
. += sizeOfApp1; /* Offset for this table */
. += sizeOfApp2; /* Offset for this table */
Text31.obj(.text) /* Linked in after the hole */
...
Text3N.obj(.text)
} load=FLASH, RUN_SIZE(_sizeOfApp3), table(_App3_copy_table)
…
} run=SARAM /* Run Address in SARAM (Overlayed) */