You copied the Doc URL to your clipboard.

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

#! 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(*)
    }
}

Was this page helpful? Yes No