4.2.2. Assembling

Some assembler features have changed between SDT and ADS. For a full list of changes between SDT and ADS 1.2, see Chapter 2 Differences. The following sections describe changes that most frequently cause problems when moving to ADS:

Interworking

In SDT, assembly language code intended for interworking is marked with the INTERWORK attribute on the AREA directive. For example:

    AREA Thumb,CODE,READONLY,INTERWORK

In ADS the INTERWORK attribute is obsolete and has been replaced with the /interwork qualifier to the -apcs option. The assembler gives the following warning:


INTERWORK area directive is obsolete. Continuing as if -apcs /inter selected.

Delete the INTERWORK attribute from your assembly language source, and assemble with the -apcs/interwork command-line option instead. At link time, the linker adds interworking veneers to the image, if required.

FUNCTION directive

ADS supports an ARM assembler directive called FUNCTION. If you have any macros in your assembly language code with the name FUNCTION, the names conflict, and the assembly fails.

You must rename any macros that use the name FUNCTION. For example, change the macro:


    FUNCTION <label>

to:


    FUNCTION1 <label>

String Literals and $

If you are porting SDT code that contains $ symbols in strings, (for example, initialization code that performs the RO and RW execution region copying and ZI initialization), you must change $ to $$ to build under ADS. For example, change:


basesym SETS   "|Image$$":CC:namecp:CC:"$$Base|"

to:


basesym SETS   "|Image$$$$":CC:namecp:CC:"$$$$Base|"

See Changed assembler behavior, and the ADS Assembler Guide for more information.

Note

In ADS, RO/RW/ZI initialization is usually done by the C library. You might not need your SDT initialization code. See Initialization of C Libraries and Execution Regions for more information.

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