C7.6.3 Execution address built-in functions for use in scatter files
Built-in functions are provided for use in scatter files to calculate execution addresses.
The execution address related functions can only be used when specifying a
base_address, +offset value, or max_size. They map to
combinations of the linker defined symbols shown in the following table.
The parameter region_name can be either a load or an
execution region name. Forward references are not permitted. The
region_name can only refer to load or execution
regions that have already been defined.
Note:
You cannot use these functions when using the .ANY selector pattern. This is because a .ANY region uses the maximum size when assigning sections. The maximum size might not be available at that point, because the size of all regions is not known until after the .ANY assignment.
The following example shows how to use
ImageLimit(region_name) to place one execution region
immediately after another:
LR1 0x8000
{
ER1 0x100000
{
*(+RO)
}
}
LR2 0x100000
{
ER2 (ImageLimit(ER1)) ; Place ER2 after ER1 has finished
{
*(+RW +ZI)
}
}
Using +offset with expressions
A +offset value for an execution region is defined in
terms of the previous region. You can use this as an input to other expressions such as
AlignExpr. For example:
LR1 0x4000
{
ER1 AlignExpr(+0, 0x8000)
{
…
}
}
By using AlignExpr, the result of +0 is aligned to a
0x8000 boundary. This creates an
execution region with a load address of 0x4000 but an execution address of 0x8000.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.