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.

8.14 Examples of using placement algorithms for .ANY sections<br />

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

These examples show <strong>the</strong> operation of <strong>the</strong> placement algorithms 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 0x10<br />

{<br />

.ANY<br />

}<br />

ER_2 0x200 0x10<br />

{<br />

.ANY<br />

}<br />

}<br />

Note<br />

These examples have --any_contingency disabled.<br />

8.14.1 Example for first_fit, next_fit, and best_fit<br />

This example shows <strong>the</strong> situation where several sections of equal size are assigned to two<br />

regions with one selector. The selectors are equally specific, equivalent to .ANY(+R0) and have<br />

no priority.<br />

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

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

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

0x00000104 0x00000004 Code RO 2 sec2 sections.o<br />

0x00000108 0x00000004 Code RO 3 sec3 sections.o<br />

0x0000010c 0x00000004 Code RO 4 sec4 sections.o<br />

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

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

Table 8-1 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-28<br />

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!