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.

Features of <strong>the</strong> Base Platform linking model<br />

11.1 Restrictions on <strong>the</strong> use of scatter files with <strong>the</strong> Base Platform model<br />

The Base Platform model supports scatter files. Although <strong>the</strong>re are no restrictions on <strong>the</strong><br />

keywords you can use in a scatter file, <strong>the</strong>re are restrictions on <strong>the</strong> types of scatter files you can<br />

use:<br />

• A load region marked with <strong>the</strong> RELOC attribute must contain only execution regions with a<br />

relative base address of +offset. The following examples show valid and invalid scatter<br />

files using <strong>the</strong> RELOC attribute and +offset relative base address:<br />

Example 11-1 Valid scatter file example using RELOC and +offset<br />

# This is valid. All execution regions have +offset addresses.<br />

LR1 0x8000 RELOC<br />

{<br />

ER_RELATIVE +0<br />

{<br />

*(+RO)<br />

}<br />

}<br />

Example 11-2 Invalid scatter file example using RELOC and +offset<br />

# This is not valid. One execution region has an absolute base address.<br />

LR1 0x8000 RELOC<br />

{<br />

ER_RELATIVE +0<br />

{<br />

*(+RO)<br />

}<br />

ER_ABSOLUTE 0x1000<br />

{<br />

*(+RW)<br />

}<br />

}<br />

• Any load region that requires a PLT section must contain at least one execution region<br />

containing code, that is not marked OVERLAY. This execution region is used to hold <strong>the</strong> PLT<br />

section. An OVERLAY region cannot be used as <strong>the</strong> PLT must remain in memory at all times.<br />

The following examples show valid and invalid scatter files that define execution regions<br />

requiring a PLT section:<br />

Example 11-3 Valid scatter file example for a load region that requires a PLT section<br />

# This is valid. ER_1 contains code and is not OVERLAY.<br />

LR_NEEDING_PLT 0x8000<br />

{<br />

ER_1 +0<br />

{<br />

*(+RO)<br />

}<br />

}<br />

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

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!