2.3.2. Procedure Call Standard options

This section applies to the ARM/Thumb Procedure Call Standard (ATPCS) as used by the ARM compilers.

See the ADS Developer Guide for more information on the ARM and Thumb procedure call standards. See Controlling code generation for other build options.

Use the following command-line options to specify the variant of the procedure call standard that is to be used by the compiler:

-apcs qualifiers

The following rules apply to the -apcs command-line option:

If no -apcs or -cpu options are specified, the default for all compilers is:


-apcs /noswst/nointer/noropi/norwpi -fpu softvfp

unless the default -fpu is overridden by the use of -cpu. See Specifying the target processor or architecture for more information.

The qualifiers are listed below.

Interworking qualifiers

/nointerwork

This option generates code with no ARM/Thumb interworking support. This is the default unless ARM architecture v5T is specified by, for example, -cpu 5T, because architecture v5T provides direct interworking support.

/interwork

This option generates code with ARM/Thumb interworking support. See the ADS Developer Guide for more information on ARM/Thumb interworking and the ADS Linker and Utilities Guide for information on the automatically generated interworking veneers. This is the default for ARM architecture v5T.

Position independence qualifiers

/noropi

This option generates code that is not (read-only) position-independent. This is the default. /nopic is an alias for this option.

/ropi

This option generates (read-only) position-independent code. /pic is an alias for this option. If this option is selected the compiler:

  • addresses read-only code and data pc-relative

  • sets the Position Independent (PI) attribute on read-only output sections.

Note

The ARM tools cannot determine if the final output image will be Read-Only Position Independent (ROPI) until the linker finishes processing input sections. This means that the linker might emit ROPI error messages, even though you have selected this option.

/norwpi

This option generates code that does not address read/write data position-independently. This is the default. /nopid is an alias for this option.

/rwpi

This option generates code that addresses read/write data position-independently (Read-Write Position Independent). /pid, for position-independent data, is an alias for this option. If you select this option, the compiler:

  • Addresses writable data using offsets from the static base register sb. This means that:

    • data address can be fixed at runtime

    • data can be multiply instanced

    • data can be, but does not have to be, position-independent.

  • Sets the PI attribute on read/write output sections.

Note

The compiler does not force your read/write data to be position-independent. This means that the linker might emit RWPI warning messages, even though you have selected this option.

Stack checking qualifiers

/noswstackcheck

This option uses the non software-stack-checking ATPCS variant. This is the default.

/swstackcheck

This option uses the software-stack-checking ATPCS variant.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D
Non-Confidential