29.12.2014 Views

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

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>Compiler</strong> Command-line Options<br />

Default<br />

If you do not specify an --apcs option, the compiler assumes<br />

--apcs=/nointerwork/noropi/norwpi.<br />

Usage<br />

/[no]interwork<br />

/[no]ropi<br />

By default, code is generated:<br />

• without interworking support, that is /nointerwork, unless<br />

you specify a --cpu option that corresponds to architecture<br />

<strong>ARM</strong>v5T or later<br />

• with interworking support, that is /interwork, for <strong>ARM</strong>v5T<br />

or later. This is because <strong>ARM</strong>v5T or later provides direct<br />

interworking support.<br />

If you select the /ropi qualifier to generate ROPI code, the<br />

compiler:<br />

• addresses read-only code and data PC-relative<br />

• sets the Position Independent (PI) attribute on read-only<br />

output sections.<br />

Note<br />

--apcs=/ropi is not supported when compiling C++.<br />

/[no]rwpi<br />

If you select the /rwpi qualifier to generate RWPI code, the<br />

compiler:<br />

• addresses writable data using offsets from the static base<br />

register sb. This means that:<br />

— the base address of the RW data region can be fixed at<br />

runtime<br />

— data can have multiple instances<br />

— data can be, but does not have to be,<br />

position-independent.<br />

• sets the PI attribute on read/write output sections.<br />

Note<br />

Because the --lower_rwpi option is the default, code that is not<br />

RWPI is automatically transformed into equivalent code that is<br />

RWPI. This static initialization is done at runtime by the C++<br />

constructor mechanism, even for C.<br />

<strong>ARM</strong> DUI 0348A Copyright © 2007, 2010 <strong>ARM</strong> Limited. All rights reserved. 2-5<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!