ARM Technical Support Knowledge Articles

Are legacy objects and libraries compatible with my project?

Applies to: ARM Developer Suite (ADS), RealView Developer Kit (RVDK) for OKI, RealView Developer Kit for XScale (RVXDK), RealView Development Suite (RVDS)

Answer

ARM strongly recommends that you rebuild your entire project, including your own libraries and any libraries or code supplied by a third party using our most recent compilation tools. This allows you to take full advantage of the improved optimization, bug fixes and new features of the latest tools. There are some restrictions and potential incompatibilities if you build your project with legacy objects and libraries, for example, you may see the following error message:

Error: L6242E: Cannot link object foo.o as its attributes are incompatible with the image attributes.

This error can be avoided as described below.


RVCT 3.1 objects and libraries

Objects and libraries built with RVCT 3.1 are compatible with RVCT 4.0 objects and libraries providing you use the RVCT 4.0 linker and RVCT 4.0 C/C++ libraries. 

Older linkers cannot process newer objects, e.g., an RVCT 3.x linker cannot link RVCT 4.0 objects.


RVCT 3.0 objects and libraries

Objects and libraries built with RVCT 3.0 are compatible with RVCT 3.1 objects and libraries providing you use the RVCT 3.1 linker and RVCT 3.1 C/C++ libraries. RVCT 3.0 objects built with --apcs /adsabi are incompatible with RVCT 3.1 because RVCT 3.1 no longer supports ADSABI (see last section).

Older linkers cannot process newer objects, e.g., an RVCT 2.x linker cannot link RVCT 3.0 objects.


RVCT 2.x objects and libraries

Objects and libraries built with RVCT 2.x are compatible with RVCT 3.x objects and libraries providing you use the RVCT 3.x linker and RVCT 3.x C/C++ libraries.

If you have legacy RVCT 2.x objects were built with the --apcs /adsabi switch, and you are now using RVCT 3.0 you must remember to compile all RVCT 3.0 objects with this switch. RVCT 2.x objects built with --apcs /adsabi are incompatible with RVCT 3.1 because RVCT 3.1 no longer supports ADSABI (see next section).

Older linkers cannot process newer objects, e.g., the ADS linker cannot link RVCT 2.x objects.


ADS and RVCT 1.2 objects and libraries

The Application Binary Interface (ABI) changed between ADS and RVCT 2.0 and later.

In ADS and RVCT 1.2, "double" and "long long" data types were 4-byte aligned (unless -Oldrd or __align were used).

In RVCT 2.0 and later, "double" and "long long" data types are 8-byte aligned, according to the ABI for the ARM Architecture. This allows efficient use of LDRD and STRD instructions in ARM Architecture 5TE and later.

These changes mean that legacy ADS 1.2 (and RVCT 1.2) objects/libraries are not directly compatible with RVCT 2.x or 3.0, however, compatibility is made possible, with some restrictions, by way of the "--apcs /adsabi" switch:

  1. To allow RVCT 2.x or 3.0 C objects to be used with legacy ADS C (or C++) objects, compile your C code with "--apcs /adsabi".

  2. To allow RVCT 2.x C++ objects to be used with legacy ADS C objects, compile your C++ code with "--apcs /adsabi". Note this can only work if your C++ code does NOT use any of the RogueWave C++ libraries, because these libraries are incompatible with objects compiled with "--apcs /adsabi".

  3. There is no compatibility possible between RVCT 2.x or 3.x C++ objects and legacy ADS C++ objects.

  4. You must link using the RVCT 2.x or 3.0 linker, not the ADS 1.2 linker, because the ADS 1.2 linker cannot process objects compiled with "--apcs /adsabi".

  5. You must link with the RVCT 2.x or 3.0 ARM-supplied C and C++ runtime libraries, because these have been built in a special way to be compatible with objects compiled with "--apcs /adsabi".

As mentioned above, given these restrictions, we *strongly* recommend that your *entire* project, including any user-supplied libraries, are rebuilt with RVCT 2.x or 3.0 to avoid any potential incompatibilities, and to take full advantage of the improved optimization, bug fixes, new features, etc.

Please note that --apcs /adsabi does not remove the requirement for the stack to be 8 byte aligned at all external interfaces. ADS and RVCT both expect the stack to be 8 byte aligned.

Support for ADS objects is deprecated in RVCT 3.0 and is removed in RVCT 3.1 and later.

Article last edited on: 2009-04-21 16:35:25

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential