-o filename

This option 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 Table 5 and Table 6.

Show/hideSyntax

If you specify a -o option, the compiler names the output file according to the conventions of Table 5.

Table 5. Compiling with the -o option

Compiler optionActionUsage notes
-o-writes output to the standard output streamfilename is -.-S is assumed unless -E is specified.
-o filenameproduces an executable image with name filename 
-c -o filenameproduces an object file with name filename 
-S -o filenameproduces an assembly language file with name filename 
-E -o filenameproduces a file containing preprocessor output with name filename 

Note

This option overrides the --default_extension option.

Show/hideDefault

If you do not specify a -o option, the compiler names the output file according to the conventions of Table 6.

Table 6. Compiling without the -o option

Compiler optionActionUsage notes
-cproduces an object file whose name defaults to the name of the input file with the filename extension .o 
-Sproduces an output file whose name defaults to the name of the input file with the filename extension .s 
-Ewrites output from the preprocessor to the standard output stream 
(No option)produces an executable image with the default name of __image.axfnone of -o, -c, -E or -S is specified on the command line

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0491H
Non-ConfidentialID070912