| |||
| Home > Using scatter files > Manual placement of __at sections | |||
You can use the standard section placement rules to place __at sections
when using the --no_autoat command-line option.
You cannot use __at section placement with
position independent execution regions.
The following example shows the placement of read-only sections .ARM.__at_0x2000 and
the read-write section .ARM.__at_0x4000. Load
and execution regions are not created automatically in manual mode.
An error is produced if an __at section cannot
be placed in an execution region.
Example 22. Placement of the variables in C or C++ code
// place the RO variable in a section called.ARM.__at_0x2000const int FOO __attribute__((section(".ARM.__at_0x2000"))) = 100; // place the RW variable in a section called.ARM.__at_0x4000int bar __attribute__((section(".ARM.__at_0x4000")));
Example 23. Manual placement of __at sections
LR1 0x0
{
ER_RO 0x0 0x2000
{
*(+RO) ; .ARM.__at_0x0 is selected by +RO
}
ER_RO2 0x2000
{
*(.ARM.__at_0x2000) ; .ARM.__at_0x2000 is selected by .ARM.__at_0x2000
}
ER2 0x4000
{
*(+RW +ZI) ; .ARM.__at_0x4000 is selected by +RW
}
}
Linker Reference:
Linker Reference: