Datasheet

ARM Compiler Reference
3-4 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
Pragmas controlling code generation
The following pragmas control how code is generated. Many other code generation
options are available from the compiler command line:
check_stack
This pragma reenables the generation of function entry code that checks
for stack limit violation if stack checking has been disabled with
#pragma
no_check_stack
and the
-apcs /swst
command-line option is used.
softfp_linkage
This pragma asserts that all function declarations up to the next
#pragma
no_softfp_linkage
describe functions that use software floating-point
linkage. The
__softfp
keyword has the same effect and is preferred (see
Function keywords on page 3-6). The pragma form can be useful when
applied to an entire interface specification (header file) without altering
that file.
import(symbol_name)
This pragma generates an importing reference to
symbol_name
. This is the
same as the assembler directive:
IMPORT symbol_name
The symbol name is placed in the symbol table of the image as an
external symbol. It is otherwise unused. You must not define the symbol
or make a reference to it.
You can use this pragma to select certain features of the C library, such as
the heap implementation or real-time division. For an example of its use,
see Avoiding the semihosting SWI on page 4-10.
arm section section_sort_list
This pragma specifies the code or data section name that used for
subsequent functions or objects. This includes definitions of anonymous
objects the compiler creates for initializations. The option has no effect
on:
declarations
inline functions (and their local static variables)
template instantiations (and their local static variables)
elimination of unused variables and functions
the order in which definitions are written to the object file.
The full syntax for the pragma is :
#pragma arm section [sort_type[[=]"name"]] [,sort_type="name"]*