Introduction
6 Copyright © 2005-2007 ARM Limited. All rights reserved. Application Note 178
ARM DAI 0178A
In addition, the function interfaces for the kernel code prior to version 2.6.16 have not
been written to comply with the ABI. This means that drivers and other kernel modules
cannot be compiled using RVCT as there are no guarantees that calls would be made
correctly between the kernel and the driver code. You must use the GNU toolchain when
building the kernel and kernel modules.
Only ARM architecture versions 5TE and above are supported
See “Target Requirements” below.
C++ exceptions are only supported with CodeSourcery’s 2007-q1-10 or later
releases
Due to slight implementation differences between how C++ exceptions are dealt with in
RVCT and GCC, the GNU C/C++ library prior to the CodeSourcery 2007-q1-10 release
did not support code generated by RVCT that used exceptions. Therefore to use C++
exceptions you must use the CodeSourcery 2007-q1-10 release or later. This includes
using these libraries on your target’s filesystem.
Also the RVCT exception handling code only supports exceptions within a statically linked
image. To throw exceptions between applications and shared libraries you must use the
unwinding code provided in the GCC support libraries.
You must take care when using
alloca()
This is implemented in a compiler-specific way, therefore when calling the function from
RVCT-compiled code you must statically link against the implementation in the RVCT
libraries. This is contained in the
alloca.o and rt_alloca_state.o C library objects.
Note also that the RVCT library implementation of
alloca() is not thread-safe and using
alloca() with setjmp() and longjmp() might lead to memory leaks. You might want
to write your own alloca() implementation around malloc(), however this would not
be trivial and we suggest that you call malloc() and free() directly where possible.
GCC inline assembly code is not compatible with RVCT and vice versa
RVCT and GCC use different syntax for inline assembly. RVCT can not compile GCC
syntax and vice versa. The recommended solution is to conditionally use alternative
copies of your inline assembly code with the appropriate syntax for each toolchain.
GAS assembly files are not compatible with the RVCT assembler and vice versa
Assembly language files cannot be built by both
armasm and the GNU assembler (gas) as
they use different syntax.
1.4 Requirements
This document assumes that you are familiar with RVDS, the GNU tools and Linux.
Target requirements
Please note that the instructions in this document relate to building Linux applications for
ARM architecture v5TE or later targets, such as the ARM926EJ-S or ARM1176JZ-S.
This is because the ARM ABI uses architecture v5TE as its base architecture and earlier
architecture versions are not fully covered by the ABI.
You might be able to use these instructions to build Linux applications for ARM
architecture v4T cores (such as the ARM720T and ARM920T) with RVCT. However, this
is entirely at your own risk and is not supported. In particular, you will not be able to use
Thumb code built for architecture v4T in shared libraries. We suggest that you only use
the GNU toolchain when building Linux applications for ARM architecture v4T targets.