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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

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

# This is not valid. All execution regions containing code are marked OVERLAY.<br />

LR_NEEDING_PLT 0x8000<br />

{<br />

ER_1 +0 OVERLAY<br />

{<br />

*(+RO)<br />

}<br />

ER_2 +0<br />

{<br />

*(+RW)<br />

}<br />

}<br />

• If a load region requires a PLT section, <strong>the</strong>n <strong>the</strong> PLT section must be placed within <strong>the</strong><br />

load region. By default, if a load region requires a PLT section, <strong>the</strong> linker places <strong>the</strong> PLT<br />

section in <strong>the</strong> first execution region containing code. You can override this choice with a<br />

scatter-loading selector.<br />

If <strong>the</strong>re is more than one load region containing code, <strong>the</strong> PLT section for a load region<br />

with name name is .plt_name. If <strong>the</strong>re is only one load region containing code, <strong>the</strong> PLT<br />

section is called .plt.<br />

The following examples show valid and invalid scatter files that place a PLT section:<br />

Example 11-5 Valid scatter file example for placing a PLT section<br />

#This is valid. The PLT section for LR1 is placed in LR1.<br />

LR1 0x8000<br />

{<br />

ER1 +0<br />

{<br />

*(+RO)<br />

}<br />

ER2 +0<br />

{<br />

*(.plt_LR1)<br />

}<br />

}<br />

LR2 0x10000<br />

{<br />

ER1 +0<br />

{<br />

*(o<strong>the</strong>r_code)<br />

}<br />

}<br />

Example 11-6 Invalid scatter file example for placing a PLT section<br />

#This is not valid. The PLT section of LR1 has been placed in LR2.<br />

LR1 0x8000<br />

{<br />

ER1 +0<br />

{<br />

*(+RO)<br />

}<br />

}<br />

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

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!