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.33 Overalignment of execution regions and input sections<br />

8.33.1 See also<br />

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

There are situations when you want to overalign code and data sections. How you deal with<br />

<strong>the</strong>m depends on whe<strong>the</strong>r or not you have access to <strong>the</strong> source code:<br />

• If you have access to <strong>the</strong> original source code, you can do this at compile time with <strong>the</strong><br />

__align(n) keyword or <strong>the</strong> --min_array_alignment command-line option, for example.<br />

• If you do not have access to <strong>the</strong> source code, <strong>the</strong>n you must use <strong>the</strong> following alignment<br />

specifiers in a scatter file:<br />

ALIGNALL Increases <strong>the</strong> section alignment of all <strong>the</strong> sections in an execution region, for<br />

example:<br />

ER_DATA ... ALIGNALL 8<br />

{<br />

... ;selectors<br />

}<br />

OVERALIGN<br />

Increases <strong>the</strong> alignment of a specific section, for example:<br />

ER_DATA ...<br />

{<br />

*.o(.bar, OVERALIGN 8)<br />

... ;selectors<br />

}<br />

Concepts<br />

• About creating regions on page boundaries on page 8-54<br />

Reference<br />

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

• Execution region attributes on page 4-11<br />

• About input section descriptions on page 4-21.<br />

<strong>Compiler</strong> Reference:<br />

• __align on page 5-3<br />

• --min_array_alignment=opt on page 3-145.<br />

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

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!