8.111 --interleave

Interleaves C or C++ source code line by line as comments within the assembly listing.

Usage

Use the --interleave option with the --asm option or -S option.

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

Table 8-4 Compiling with the --interleave option

Compiler option Action
--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 re-assemble 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.

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