Example of aligning a base address in execution space but still tightly packed in load space

This example uses a combination of preprocessor macros and expressions to copy tightly packed execution regions to execution addresses in a page-boundary. Using the ALIGN scatter-loading keyword aligns the load addresses of ER2 and ER3 as well as the execution addresses

Example 13. Aligning a base address in execution space but still tightly packed in load space

#! armcc -E
#DEFINE START_ADDRESS  0x100000
#DEFINE PAGE_ALIGNMENT 0x100000

LR1 0x8000
{
    ER0 +0
    {
        *(InRoot$$Sections)
    }
    ER1 START_ADDRESS
    {
        file1.o(*)
    }
    ER2 AlignExpr(ImageLimit(ER1), PAGE_ALIGNMENT)
    {
        file2.o(*)
    }
    ER3 AlignExpr(ImageLimit(ER2), PAGE_ALIGNMENT)
    {
        file3.o(*)
    }
}

Show/hideSee also

Copyright © 2008, 2011-2012 ARM. All rights reserved.ARM DUI 0458C
Non-ConfidentialID062912