06.02.2013 Views

ARM Compiler toolchain Using the Linker - ARM Information Center

ARM Compiler toolchain Using the Linker - ARM Information Center

ARM Compiler toolchain Using the Linker - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8.32 About creating regions on page boundaries<br />

8.32.1 See also<br />

<strong>Using</strong> scatter files<br />

You can produce an ELF file that can be loaded directly to a target with each execution region<br />

starting at a page boundary.<br />

The linker provides <strong>the</strong> following built-in functions to help create load and execution regions<br />

on page boundaries:<br />

• AlignExpr<br />

• GetPageSize.<br />

Note<br />

Alignment on an execution region causes both <strong>the</strong> load address and execution address to be<br />

aligned.<br />

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

LR1 GetPageSize() + SizeOfHeaders()<br />

{<br />

ER_RO +0<br />

{<br />

*(+RO)<br />

}<br />

ER_RW +GetPageSize()<br />

{<br />

*(+RW)<br />

}<br />

ER_ZI +0<br />

{<br />

*(+ZI)<br />

}<br />

}<br />

Example 8-21 Creating regions on page boundaries<br />

The default page size 0x8000, is used. You can change <strong>the</strong> page size with <strong>the</strong> --pagesize<br />

command-line option.<br />

Concepts<br />

• Demand paging on page 4-23<br />

• Overalignment of execution regions and input sections on page 8-56<br />

• Expression evaluation in scatter files on page 8-58<br />

• <strong>Using</strong> expression evaluation in a scatter file to avoid padding on page 8-59.<br />

Reference<br />

<strong>Linker</strong> Reference:<br />

• --pagesize=pagesize on page 2-118<br />

• Load region attributes on page 4-7<br />

• Execution region attributes on page 4-11<br />

• Example of aligning a base address in execution space but still tightly packed in load<br />

space on page 4-41<br />

• AlignExpr(expr, align) function on page 4-42<br />

<strong>ARM</strong> DUI 0474C Copyright © 2010-2011 <strong>ARM</strong>. All rights reserved. 8-54<br />

ID080411 Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!