| |||||||||||||
Technical Support On-Line Manuals RealView Linker and Utilities Guide | Type 1, one load region and contiguous execution regions
An image of this type consists of a single load region in the load view and three execution regions in the execution view. The execution regions are placed contiguously in the memory map.
Example 5.23. Single load region and contiguous execution regions
LR_1 0x040000 ; Define the load region name as LR_1, the region starts at 0x040000.
{
ER_RO +0 ; First execution region is called ER_RO, region starts at end of previous region.
; However, since there is no previous region, the address is 0x040000.
{
* (+RO) ; All RO sections go into this region, they are placed consecutively.
}
ER_RW +0 ; Second execution region is called ER_RW, the region starts at the end of the
; previous region . The address is 0x040000 + size of ER_RO region.
{
* (+RW) ; All RW sections go into this region, they are placed consecutively.
}
ER_ZI +0 ; Last execution region is called ER_ZI, the region starts at the end of the
; previous region at 0x040000 + the size of the ER_RO regions + the size of
; the ER_RW regions.
{
* (+ZI) ; All ZI sections are placed consecutively here.
}
}
The description shown in Example 5.23 creates an image with one load region called The image has three execution regions, named The In this variant, the execution regions are placed contiguously in the memory map. However, Example 5.24 shows the scatter-loading description equivalent to using Example 5.24. Position-independent code
LR_1 0x010000 PI ; The first load region is at 0x010000.
{
ER_RO +0 ; The PI attribute is inherited from parent.
; The default execution address is 0x010000, but the code can be moved.
{
* (+RO) ; All the RO sections go here.
}
ER_RW +0 ABSOLUTE ; PI attribute is overridden by ABSOLUTE.
{
* (+RW) ; The RW sections are placed next . They cannot be moved.
}
ER_ZI +0 ; ER_ZI region placed after ER_RW region.
{
* (+ZI) ; All the ZI sections are placed consecutively here.
}
}
Shown in Example 5.24, | ||||||||||||
| |||||||||||||