You copied the Doc URL to your clipboard.

ARM Compiler armlink User Guide : Creation of regions on page boundaries

Creation of regions on page boundaries

You can produce an ELF file that can be loaded directly to a target with each execution region starting at a page boundary.

The linker provides the following built-in functions to help create load and execution regions on page boundaries:

  • AlignExpr.

  • GetPageSize. You must also use the --paged command-line option if you use this function.

Note

Alignment on an execution region causes both the load address and execution address to be aligned.

The following example produces an ELF file with each execution region starting on a new page:

LR1 GetPageSize() + SizeOfHeaders()
{
    ER_RO +0
    {
        *(+RO)
    }
    ER_RW AlignExpr(+0, GetPageSize())
    {
        *(+RW)
    }
    ER_ZI AlignExpr(+0, GetPageSize())
    {
        *(+ZI)
    }
}

The default page size 0x8000, is used. You can change the page size with the --pagesize command-line option.

Was this page helpful? Yes No