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.12 Placing sections with FIRST and LAST attributes<br />

4.12.1 See also<br />

Image structure and generation<br />

You can make sure that a section is placed ei<strong>the</strong>r first or last in its execution region. For example,<br />

you might want to make sure <strong>the</strong> section containing <strong>the</strong> vector table is placed first in <strong>the</strong> image.<br />

To do this, use one of <strong>the</strong> following methods:<br />

• If you are not using scatter-loading, use <strong>the</strong> --first and --last linker command-line<br />

options to place input sections.<br />

• If you are using scatter-loading, use <strong>the</strong> attributes FIRST and LAST in <strong>the</strong> file to mark <strong>the</strong><br />

first and last input sections in an execution region if <strong>the</strong> placement order is important.<br />

However, FIRST and LAST must not violate <strong>the</strong> basic attribute sorting order. For example,<br />

FIRST RW is placed after any read-only code or read-only data.<br />

Concepts<br />

• The image structure on page 4-3<br />

• Input sections, output sections, regions, and Program Segments on page 4-5<br />

• Load view and execution view of an image on page 4-6<br />

• Section placement with <strong>the</strong> linker on page 4-19<br />

• About scatter-loading on page 8-3.<br />

Reference<br />

<strong>Linker</strong> Reference:<br />

• --first=section_id on page 2-71<br />

• --last=section_id on page 2-93<br />

• Syntax of an input section description on page 4-22.<br />

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

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!