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.

4.20 Reuse of veneers when scatter-loading<br />

4.20.1 See also<br />

Image structure and generation<br />

The linker reuses veneers whenever possible, but <strong>the</strong>re are some limitations on <strong>the</strong> reuse of<br />

veneers in protected load regions and overlaid execution regions.<br />

A scatter file enables you to create regions that share <strong>the</strong> same area of RAM:<br />

• If you use <strong>the</strong> PROTECTED keyword for a load region it prevents:<br />

— overlapping of load regions<br />

— veneer sharing<br />

— string sharing with <strong>the</strong> --merge option.<br />

• If you use <strong>the</strong> OVERLAY keyword for a region, both <strong>the</strong> following conditions are enforced<br />

on reuse:<br />

— an overlay execution region cannot reuse a veneer placed in any o<strong>the</strong>r overlay<br />

execution region<br />

— no o<strong>the</strong>r execution region can reuse a veneer placed in an overlay execution region.<br />

If <strong>the</strong>se conditions are not met, new veneers are created instead of reusing existing ones. Unless<br />

you have instructed <strong>the</strong> linker to place veneers somewhere specific using scatter-loading, a<br />

veneer is always placed in <strong>the</strong> execution region that contains <strong>the</strong> call requiring <strong>the</strong> veneer. This<br />

implies that:<br />

• for an overlay execution region, all its veneers are included within <strong>the</strong> execution region<br />

• an overlay execution region never requires a veneer from ano<strong>the</strong>r execution region.<br />

Concepts<br />

• Overview of veneers on page 4-26.<br />

Reference<br />

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

• Address attributes for load and execution regions on page 4-14.<br />

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

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!