8.138 -o filename

Specifies the name of the output file.

The full name of the output file produced depends on the combination of options used, as described in the following tables.

Syntax

If you specify a -o option, the compiler names the output file according to the conventions described by the following table.

Table 8-5 Compiling with the -o option

Compiler option Action Usage notes
-o- writes output to the standard output stream filename is -.-S is assumed unless -E is specified.
-o filename produces an executable image with name filename -
-c -o filename produces an object file with name filename -
-S -o filename produces an assembly language file with name filename -
-E -o filename produces a file containing preprocessor output with name filename -

Note:

This option overrides the --default_extension option.

Default

If you do not specify a -o option, the compiler names the output file according to the conventions described by the following table.

Table 8-6 Compiling without the -o option

Compiler option Action Usage notes
-c produces an object file whose name defaults to the name of the input file with the filename extension .o -
-S produces an output file whose name defaults to the name of the input file with the filename extension .s -
-E writes output from the preprocessor to the standard output stream -
(No option) produces an executable image with the default name of __image.axf none of -o, -c, -E or -S is specified on the command line
Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.