8.13 --asm

Instructs the compiler to write a listing to a file of the disassembly of the machine code generated by the compiler.

Object code is generated when this option is selected. The link step is also performed, unless the -c option is chosen.

Note:

To produce a disassembly of the machine code generated by the compiler, without generating object code, select -S instead of --asm.

Usage

The action of --asm, and the full name of the disassembly file produced, depends on the combination of options used:

Table 8-1 Compiling with the --asm option

Compiler option Action
--asm

Writes a listing to a file of the disassembly of the compiled source.

The link step is also performed, unless the -c option is used.

The disassembly is written to a text file whose name defaults to the name of the input file with the filename extension .s.

--asm -c

As for --asm, except that the link step is not performed.

--asm --interleave

As for --asm, except that the source code is interleaved with the disassembly.

The disassembly is written to a text file whose name defaults to the name of the input file with the filename extension .txt.

--asm --multifile

As for --asm, except that the compiler produces empty object files for the files merged into the main file.

--asm -o filename

As for --asm, except that the object file is named filename.

The disassembly is written to the file filename.s.

The name of the object file must not have the filename extension .s. If the filename extension of the object file is .s, the disassembly is written over the top of the object file.

Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.