as - assembler
as [-VTm] [-Q yn] [-Y key,dir] [-o objfile] [-t cpu] file . . .
The as command produces an object file from the concatenation
of the specified assembly language input files. At least one
source file must be specified, except when the -V option is
given. The name ``-'' designates the standard input, and may
be specified anywhere within the list of files.
The recognized assembly language does not include a general
macro processing capability. Instead, as provides for
optional preprocessing of the input by the m4 command. [See
The following options may be specified in any order:
-V Writes the assembler's packaging, release, and
version information on the standard error output.
As a special case, the assembler does no other
processing if no input files are specified.
-T Accepts input that contains old-style (COFF)
directives. Nevertheless, most such directives are
still ineffective, as the assembler generates an ELF
-m Sends the input through the m4 macro processing
command prior to assembly. All file operands are
passed unmodified to the m4 command. (By using the
``--'' option-terminator, m4 options can be
preserved and passed through to the m4 command; see
the EXAMPLES section, below.) If present, the
predefined macros file, LIBDIR⁄cm4defs, will be
given to the m4 command as the initial input file.
-Q yn Appends the assembler's release information to the
``.comment'' section of the generated output object
file if yn is y; otherwise (if yn is n or if no -Q
option is specified), nothing is added.
Uses the directory dir to find the files specified
by key: the m4 macro processing command (m), the
predefined macros file (d), or both.
Causes objfile to be the name of the generated
output object file. If no -o is specified, then the
output object file is created in the current
directory with a name that depends on the specified
input files. If an input file with a name that ends
with ``.s'' is present, the output file name is
formed by replacing the suffix of the first such
name with ``.o''; otherwise, the output file is
-t cpu Specifies the target processor to be cpu, which may
be 486 (the default), 386, or pentium. This option
causes code generation specifically tuned to the
Send, in order, .⁄cm4defs (if it exists) and mydefs and
sys⁄file.s through m4 with the macro K predefined to be 7,
assemble the output of m4, and generate the ELF object file
output in .⁄file.o:
as -m -Yd,. -- -DK=7 mydefs sys⁄file.s
language-specific message file [See LANG on environ(5).]
a.out(4), cc(1), elf(3E), ld(1), m4(1), nm(1), strip(1)
The m4 macro processor is not line-oriented and recognizes
many regular identifiers as its keywords (index and len, for
example). Thus, preprocessing compiler-generated assembly
language with m4 requires care.
Whenever possible, you should access the assembler through a
compilation system interface program such as cc.