2.4.4. Changed assembler behavior

This section describes assembler behavior that is changed, deprecated, or obsolete. Obsolete features are identified explicitly. Their use is faulted in ADS. Deprecated features will be made obsolete in future releases. Their use is warned about in ADS.

New or changed assembler behavior

The following enhancements and changes are available in the assembler:

  • The assembler provides new ATPCS command-line options similar to those for the compilers.

  • The default floating-point option is -fpu softvfp.

  • A new default software stack checking option of -swstna is introduced for code that is compatible with both software stack checking code and non software stack checking code. This option makes explicit the behavior of the assembler. There is no change to the default behavior.

  • The assembler always outputs ELF object code. AOF is no longer supported.

  • The assembler requires the dollar ($) and double quotation (") characters to be doubled when they are included in string literals. SDT 2.50/2.51 required only a single dollar or double quote character. For example, the following statement in SDT:


    copyloadsym SETS  "|Load$$":CC:namecp:CC:"$$Base|"

    must in ADS be:


    copyloadsym SETS  "|Load$$$$":CC:namecp:CC:"$$$$Base|"

  • The new -memaccess option specifies the memory attributes of the target system.

  • The -list option now accepts an argument of - to select stdout.

  • DWARF2 stack-unwinding descriptions can be, and are recommended to be, produced by the use of new directives.

  • The assembler supports the new ARM9E and ARM10 instructions. Use one of ARM9E, ARM10TDMI™, ARM1020T, or ARM10200™ with the -cpu option.

  • Support is provided for VFP in both scalar and vector mode.

  • New directives DCQ and DCQU define a 64-bit integer value. DCQ is aligned to a 32-bit boundary while DCQU is unaligned (byte boundary).

  • The DCFD, DCFDU, DCFS and DCFSU directives now also accept a hex-constant form of operand that specifies the IEEE bit-pattern of the value.

  • There are new synonyms FIELD and SPACE for # and % directives.

  • Directives are now accepted in all upper case, or all lower case, but not a mixture. Previously, only the upper case form was accepted.

  • The EXPORT directive may have a new attribute, WEAK. This defines the exported symbol as a WEAK symbol in ELF.

  • The semantics of the EXTERN and IMPORT directives have changed and they are no longer synonyms. An unused IMPORT generates an undefined global symbol, whereas an unused EXTERN generates no symbol. (In SDT 2.50/2.51 an unused EXTERN or IMPORT symbol was made WEAK).

  • The AREA directive has a new attribute, ASSOC= area_name) that requires this AREA to be included in a link step whenever the associate area (named by the ASSOC=area_name) is included. The assembler implements the requirement by generating an R_ARM_NONE relocation at offset 0 of area area_name, relative to the section symbol for the area defined by the AREA directive.

  • The new directive REQUIREarea_name requires area_name. to be included in any link step that includes the requiring section. The assembler implements the requirement by generating an R_ARM_NONE relocation in the current section to the required area_name.

  • The DCD directive now accepts expressions evaluating the difference between a label in another section and a position in the current section.

  • The DCW and DCB directives now accept expressions including an external symbol.

  • The new DCDO directive treats label operands as sb-relative.

  • The literal-using, pseudo-instruction forms of load and store instructions (for example, LDR rx,=yyy) can now take external symbols as immediate values (yyy).

  • The ARM instructions of the form data-processing-op rd,rn,#sym can now take external symbols as immediate operands.

  • ARM and Thumb SWI instructions can now take external symbols as immediate operands.

  • If you select a cpu or architecture that does not support Thumb, an attempt to generate Thumb code will generate an error message. For example armasm -cpu 4 will not accept Thumb instructions but armasm -cpu 4T will.

Features of the SDT assembler not supported

The following assembly language features are no longer supported and are faulted:

  • AREA directive with attribute ABS, BASED, A32bit, HALFWORD, INTERWORK, PIC, REENTRANT

    • ABS has been withdrawn because it conflicts with the linker scatter-loading mechanism. An AREA previously declared ABS should now be placed using a scatter-loading description

    • BASED has been withdrawn because it was needed only for the old shared library mechanism that is now obsolete. No workaround is necessary.

    • A32bit has been withdrawn as it was needed only to distinguish 32 bit mode code from 26 bit mode code and 26 bit mode is now obsolete.

    • INTERWORK and PIC have been withdrawn as the ATPCS and architecture are now always specified on the command line. Any occurrences of these attributes should be deleted, and replaced by the corresponding new -apcs command line qualifiers.

  • Value 32 as operand to the ALIGN area attribute. The assembler accepted 32 as operand to ALIGN even though it was not useful. The only address that satisfies ALIGN=32 is 0, and if that is the desired behavior it can be expressed by using a scatter-loading description to place the AREA at address 0.

  • IMPORT directive with attribute FPREGARGS. The FPREGARGS attribute had no effect and has been removed.

  • EXPORT directive with attribute FPREGARGS, and LEAF.

    • The FPREGARGS attribute had no effect. The workaround is to delete it from assembly source.

    • The LEAF attribute was needed only for the old shared library mechanism that is now obsolete. The workaround is to remove it.

  • ADR pseudo-instructions with out-of-area symbol operands. The workaround is to load out-of-area addresses into registers using LDR.

Deprecated assembler options

The following options are deprecated and will not be supported in future versions of the assembler:

-dwarf1

DWARF1 debug tables will not be supported in future versions (use DWARF2 instead).

-proc

Select processor (use -cpu instead).

-arch

Select architecture (use -cpu instead).

Impact

Use DWARF2 format for new projects and update your existing tools to use the DWARF2 format.

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