| |||
| Home > Formal syntax of the scatter file > Inheritance rules for execution region address attributes | |||
For an execution region to inherit the attributes of a previous
execution region, specify a + base
address for that region. The first offset+ execution
region can inherit the attributes of the parent load region. An
execution region cannot inherit attributes if you:offset
explicitly set the attribute of that execution region
the previous execution region has the OVERLAY attribute.
You can explicitly set an execution region with the ABSOLUTE, PI,
or OVERLAY attributes. However, an execution
region can only inherit the RELOC attribute from
the parent load region.
This example shows the inheritance rules for setting the address attributes of execution regions:
Example 6. Execution region inheritance
LR1 0x8000 PI
{
ER1 +0 ; ER1 inherits PI from LR1
{
...
}
ER2 +0 ; ER2 inherits PI from ER1
{
...
}
ER3 0x10000 ; ER3 does not inherit because it has no relative base
address and gets the default of ABSOLUTE
{
...
}
ER4 +0 ; ER4 inherits ABSOLUTE from ER3
{
...
}
ER5 +0 PI ; ER5 does not inherit, it explicitly sets PI
{
...
}
ER6 +0 OVERLAY ; ER6 does not inherit, an OVERLAY cannot inherit
{
...
}
ER7 +0 ; ER7 cannot inherit OVERLAY, gets the default of ABSOLUTE
{
...
}
}