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.

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

8.15 Example of next_fit algorithm showing behavior of full regions, selectors, and<br />

priority<br />

This example shows <strong>the</strong> operation of <strong>the</strong> next_fit placement algorithm for RO-CODE sections in<br />

sections.o.<br />

The input section properties and ordering are shown in <strong>the</strong> following table:<br />

The scatter file used for <strong>the</strong> examples is:<br />

LR 0x100<br />

{<br />

ER_1 0x100 0x20<br />

{<br />

.ANY1(+RO-CODE)<br />

}<br />

ER_2 0x200 0x20<br />

{<br />

.ANY2(+RO)<br />

}<br />

ER_3 0x300 0x20<br />

{<br />

.ANY3(+RO)<br />

}<br />

}<br />

Note<br />

This example has --any_contingency disabled.<br />

The next_fit algorithm is different to <strong>the</strong> o<strong>the</strong>rs in that it never revisits a region that is<br />

considered to be full. This example also shows <strong>the</strong> interaction between priority and specificity<br />

of selectors - this is <strong>the</strong> same for all <strong>the</strong> algorithms.<br />

Execution Region ER_1 (Base: 0x00000100, Size: 0x00000014, Max: 0x00000020, ABSOLUTE)<br />

Base Addr Size Type Attr Idx E Section Name Object<br />

0x00000100 0x00000014 Code RO 1 sec1 sections.o<br />

Execution Region ER_2 (Base: 0x00000200, Size: 0x0000001c, Max: 0x00000020, ABSOLUTE)<br />

Base Addr Size Type Attr Idx E Section Name Object<br />

Table 8-2 Input section properties<br />

Name Size<br />

sec1 0x4<br />

sec2 0x4<br />

sec3 0x4<br />

sec4 0x4<br />

sec5 0x4<br />

sec6 0x4<br />

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

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!