2.1.67. --interleave

This option interleaves C or C++ source code line by line as comments within an assembly listing generated using the --asm option or -S option.

Usage

The action of --interleave depends on the combination of options used:

Table 2.3. Compiling with the ---interleave option

Compiler optionAction
--asm --interleave

Writes a listing to a file of the disassembly of the compiled source, interleaving the source code with the disassembly.

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 .txt

-S --interleave

Writes a listing to a file of the disassembly of the compiled source, interleaving the source code 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


Restrictions

  • You cannot reassemble an assembly listing generated with --asm --interleave or -S --interleave.

  • Preprocessed source files contain #line directives. When compiling preprocessed files using --asm --interleave or -S --interleave, the compiler searches for the original files indicated by any #line directives, and uses the correct lines from those files. This ensures that compiling a preprocessed file gives exactly the same output and behavior as if the original files were compiled.

    If the compiler cannot find the original files, it is unable to interleave the source. Therefore, if you have preprocessed source files with #line directives, but the original unpreprocessed files are not present, you must remove all the #line directives before you compile with --interleave.

See also

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A
Non-Confidential