7.9 --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 7-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.
Related reference
7.17 -c
7.90 --interleave
7.115 --multifile, --no_multifile
7.119 -o filename
7.149 -S
2.7 Filename suffixes recognized by the compiler
Non-ConfidentialPDF file icon PDF versionARM DUI0375F
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.