You copied the Doc URL to your clipboard.
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
, is used.
You can change the page size with the 0x8000
--pagesize
command-line option.