1.57 -o

Specifies the name of the output file.

The option -o filename specifies the name of the output file produced by the compiler.

The option -o- redirects output to the standard output stream when used with the -c or -S options.

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 1-4 Compiling without the -o option

Compiler option Action Usage notes
-c Produces an object file whose name defaults to filename.o in the current directory. filename is the name of the source file stripped of any leading directory names. -
-S Produces an assembly file whose name defaults to filename.s in the current directory. filename is the name of the source file stripped of any leading directory names. -
-E Writes output from the preprocessor to the standard output stream -
(No option) Produces temporary object files, then automatically calls the linker to produce an executable image with the default name of a.out None of -o, -c, -E or -S is specified on the command line
Non-ConfidentialPDF file icon PDF versionDUI0774J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.