| |||
| Home > Formal syntax of the scatter file > Inheritance rules for the RELOC address attribute | |||
You can explicitly set the RELOC attribute
for a load region. However, an execution region can only inherit
the RELOC attribute from the parent load region.
For a Base Platform linking model, if a load region has the RELOC attribute,
then all execution regions within that load region must have a + base
address. This ensures the execution regions inherit the relocations
from the parent load region.offset
This example shows the inheritance rules for setting the address
attributes with RELOC:
Example 7. Inheriting RELOC
LR1 0x8000 RELOC
{
ER1 +0 ; inherits RELOC from LR1
{
...
}
ER2 +0 ; inherits RELOC from ER1
{
...
}
ER3 +0 RELOC ; Error cannot explicitly set RELOC on an execution region
{
...
}
}