2.2.1. 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.c

A 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.h

A header file. This is a convention only. It is not specifically recognized by the compiler.

filename.o

An ARM object file.

filename.s

An ARM or Thumb assembly language file.

filename.lst

A compiler listing file. This is an output file only.

Portability

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.

Filename validity

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.

Output files

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.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C