5.1 Migration of assembler command-line options from armasm to the armclang integrated assembler

Arm® Compiler 6 provides many command-line options, including most Clang command-line options as well as several Arm-specific options.

Note:

This topic includes descriptions of [COMMUNITY] features. See Support level definitions.

Note:

The following GNU assembly directives are [COMMUNITY] features:

  • .eabi_attribute Tag_ABI_PCS_RO_data, value
  • .eabi_attribute Tag_ABI_PCS_R9_use, value
  • .eabi_attribute Tag_ABI_PCS_RW_data, value
  • .eabi_attribute Tag_ABI_VFP_args, value
  • .eabi_attribute Tag_CPU_unaligned_access, value
  • .ident
  • .protected
  • .section .note.GNU-stack, "x"
  • -Wa,--noexecstack
  • -Wa,-L
  • -Wa,-defsym,symbol=value

The following table describes the most common armasm command-line options, and shows the equivalent options for the armclang integrated assembler.

Additional information about command-line options is available:

  • The armclang Reference Guide provides more detail about a number of command-line options.
  • For a full list of Clang command-line options, consult the Clang and LLVM documentation.

Table 5-1 Comparison of command-line options in armasm and the armclang integrated assembler

armasm option armclang integrated assembler option Description
‑‑arm_only No equivalent. Enforces A32 instructions only.
--apcs=/nointerwork No equivalent. Specifies that the code in the input file can interwork between A32 and T32 safely. Interworking is always enabled in Arm Compiler 6.

‑‑apcs=/ropi,

‑‑apcs=/noropi

No direct equivalent.

With armasm, the options specify whether the code in the input file is Read-Only Position-Independent (ROPI) code.

With the armclang integrated assembler, use the GNU assembly .eabi_attribute directive instead.

To specify that the code is ROPI code, use the directive as follows:

    .eabi_attribute Tag_ABI_PCS_RO_data, 1

The code is marked as not ROPI code by default.

‑‑apcs=/rwpi,

‑‑apcs=/norwpi

No direct equivalent.

With armasm, the options specify whether the code in the input file is Read-Write Position-Independent (RWPI) code.

With the armclang integrated assembler, use the GNU assembly .eabi_attribute directive instead.

To specify that the code is RWPI code, use the directive as follows:

    .eabi_attribute Tag_ABI_PCS_R9_use,  1
    .eabi_attribute Tag_ABI_PCS_RW_data, 2

The code is marked as not RWPI code by default.

‑‑apcs=/hardfp,

‑‑apcs=/softfp

No direct equivalent.

With armasm, the options set attributes in the object file to request hardware or software floating-point linkage.

With the armclang integrated assembler, use the GNU assembly .eabi_attribute directive instead.

To request hardware floating-point linkage, use the directive as follows:

    .eabi_attribute Tag_ABI_VFP_args, 1

To request software floating-point linkage, use the directive as follows:

    .eabi_attribute Tag_ABI_VFP_args, 0

‑‑checkreglist,

‑‑diag_warning=1206

This is the default.

Generates warnings if register lists in LDM and STM instructions are not provided in increasing register number order.

Note:

This warning cannot be suppressed or upgraded to an error.

‑‑comment_section,

‑‑no_comment_section

No direct equivalent.

With armasm, the option controls the inclusion of a comment section .comment in object files.

With the armclang integrated assembler, use the GNU assembly .ident directive to manually add a comment section.

‑‑debug,

‑g

‑g

Instructs the assembler to generate DWARF debug tables.

With armasm, the default format for debug tables is DWARF 3. Named local labels are not preserved in the object file, unless the ‑‑keep option is used.

With the armclang integrated assembler, the default format for debug tables is DWARF 4. Named local labels are always preserved in the object file. See the entry for ‑‑keep in this table for details.

‑‑diag_warning=1645 No equivalent.

With armasm, the option enables warnings about instruction substitutions.

With the armclang integrated assembler, instruction substitution support is limited. Where it is not supported, the assembler generates an error message.

Use the armasm warning when migrating code to find instructions being substituted and perform the substitution manually.

‑‑diag_warning=1763 No equivalent.

With armasm, the option enables warnings about automatic generation of IT blocks when assembling T32 code (formerly Thumb code).

With the armclang integrated assembler, automatic generation of IT blocks is disabled by default. The assembler generates an error message when assembling conditional instructions without an enclosing IT block. To enable automatic generation of IT blocks, use the command-line option ‑mimplicit‑it=always or ‑mimplicit‑it=thumb.

‑‑dllexport_all No direct equivalent.

With armasm, the option gives all exported global symbols STV_PROTECTED visibility in ELF rather than STV_HIDDEN, unless overridden by source directives.

With the armclang integrated assembler, use the GNU assembly .protected directive to manually give exported symbols STV_PROTECTED visibility.

‑‑execstack,

‑‑no_execstack

‑Wa,‑‑noexecstack

No direct equivalent for ‑‑execstack.

With armasm, the option generates a .note.GNU‑stack section marking the stack as either executable or non-executable.

With the armclang integrated assembler, the equivalent option can be used to generate a .note.GNU‑stack section marking the stack as non-executable.

To generate such a section and mark the stack as executable, use the GNU assembly .section directive as follows:

    .section .note.GNU‑stack, "x"

The command-line option ‑Wa,‑‑noexecstack overrides the use of the .section directive.

‑‑keep No direct equivalent.

With armasm, the option instructs the assembler to keep named local labels in the symbol table of the object file, for use by the debugger.

With the armclang integrated assembler, named local labels defined without using the GNU assembly local symbol name prefix .L are always preserved in the object file.

Use the command-line option ‑Wa,‑L to automatically preserve all named local labels defined using the GNU assembly local symbol name prefix.

‑M ‑M

Instructs the assembler to produce a list of makefile dependency lines suitable for use by a make utility. It only includes dependencies visible to the preprocessor.

The option does not include files added using the INCBIN, INCLUDE, or GET directives with armasm, or the GNU assembly .incbin or .include directives with the armclang integrated assembler.

Note:

With the armclang integrated assembler, using this option with ‑o outputs the makefile dependency lines to the file specified. An object file is not produced.
‑‑mm ‑MM

Creates a single makefile dependency file, without the system header files. It only includes dependencies visible to the preprocessor.

The option does not include files added using the INCBIN, INCLUDE, or GET directives with armasm, or the GNU assembly .incbin or .include directives with the armclang integrated assembler.

Note:

With the armclang integrated assembler, using this option with ‑o outputs the makefile dependency file to the file specified. An object file is not produced.
‑‑no_hide_all This is the default. Gives all exported and imported global symbols STV_DEFAULT visibility in ELF rather than STV_HIDDEN, unless overridden using source directives.

‑‑predefine "directive",

‑‑pd "directive"

‑Wa,‑defsym,symbol=value

With armasm, the option instructs the assembler to pre-execute one of the SETA, SETL, or SETS directives as specified using directive.

With the armclang integrated assembler, the option instructs the assembler to pre-define the symbol symbol with the value value. This GNU assembly .set directive can be used to change this value in the file being assembled.

‑‑unaligned_access,

‑‑no_unaligned_access

No direct equivalent.

With armasm, the options instruct the assembler to set an attribute in the object file to enable or disable the use of unaligned accesses.

With the armclang integrated assembler, use the GNU assembly .eabi_attribute directive instead.

To enable the use of unaligned access, use the directive as follows:

    .eabi_attribute Tag_CPU_unaligned_access, 1

To disable the use of unaligned access, use the directive as follows:

    .eabi_attribute Tag_CPU_unaligned_access, 0
‑‑unsafe No direct equivalent.

With armasm, the option enables instructions for architectures other than the target architecture to be assembled without error.

With the armclang integrated assembler, use the GNU assembly .inst directive to generate such instructions.

Non-ConfidentialPDF file icon PDF version100068_0609_00_en
Copyright © 2014–2017 Arm Limited (or its affiliates). All rights reserved.