| |||
| Home > The ARM Compilers > File usage > Naming conventions | |||
The ARM compilers use suffix naming conventions to identify
the classes of file involved in the compilation and linking processes.
The names used on the command line, and as arguments to preprocessor #include directives,
map directly to host file names under UNIX and Windows/MS-DOS.
The ARM compilers recognize the following file suffixes:
filename.cA C or C++ source file.
In addition, the ARM C++ compilers recognize suffixes of the form .c*, such
as:
.cpp
.cp
.c++
.cc
and their uppercase equivalents.
filename.hA header file. This is a convention only. It is not specifically recognized by the compiler.
filename.oAn ARM object file.
filename.sAn ARM or Thumb assembly language file.
filename.lstA compiler listing file. This is an output file only.
The ARM compilers support multiple file naming conventions on all supported hosts. Follow these guidelines:
ensure that filenames do not contain spaces
make embedded pathnames relative, rather than absolute.
In each host environment the compilers support:
Native filenames.
Pseudo UNIX filenames. These have the format: host-volume-name:/rest-of-unix-file-name
UNIX filenames.
Filenames are parsed as follows:
a name starting with host-volume-name:/ is
a pseudo UNIX filename
a name that does not start with host-volume-name:/ and
contains / is a UNIX filename
otherwise, the name is a host name.
The compilers do not check that filenames are acceptable to the host file system. If a filename is not acceptable, the compiler reports that the file could not be opened, but gives no further diagnosis.
By default, the object, assembler, and listing files created by a compiler are stored in the current directory. Object files are written in ARM Object Format (AOF). AOF is described in Chapter 15 ARM Object Format.