MAN page from Trustix binutils-


Section: GNU Development Tools (1)
Updated: 29 March 1996



GNU as - the portable GNU assembler.



as[-a[dhlns][=file]][-D][--defsym SYM=VAL][-f][--gstabs][-Ipath][-K][-L][-M | --mri][-oobjfile][-R][--traditional-format][-v][-w][-- | files...]

i960-only options:

m680x0-only options:



GNU as is really a family of assemblers. If you use (or have used) the GNU assembler on one architecture, youshould find a fairly similar environment when you use it on anotherarchitecture. Each version has much in common with the others,including object file formats, most assembler directives (often calledpseudo-ops) and assembler syntax.

For information on the syntax and pseudo-ops used by GNU as, see `as' entry in info (or the manual Using as: The GNU Assembler).

as is primarily intended to assemble the output of the GNU Ccompiler gcc for use by the linker ld. Nevertheless,we've tried to make as assemble correctly everything that the nativeassembler would.This doesn't mean as always uses the same syntax as anotherassembler for the same architecture; for example, we know of severalincompatible versions of 680x0 assembly language syntax.

Each time you run as it assembles exactly one sourceprogram. The source program is made up of one or more files.(The standard input is also a file.)

If as is given no file names it attempts to read one input filefrom the as standard input, which is normally your terminal. Youmay have to type ctl-D to tell as there is no more programto assemble. Use `--' if you need to explicitly name the standard input filein your command line.

as may write warnings and error messages to the standard errorfile (usually your terminal). This should not happen when as isrun automatically by a compiler. Warnings report an assumption made sothat as could keep assembling a flawed program; errors report agrave problem that stops the assembly.



Turn on assembly listings. There are various suboptions.domits debugging directives.hincludes the high level source code; this is only available if thesource file can be found, and the code was compiled with-g.lincludes an assembly listing.nomits forms processing.sincludes a symbol listing.=filesets the listing file name; this must be the last suboption.The default suboptions arehls.
This option is accepted only for script compatibility with calls toother assemblers; it has no effect on as.
--defsym SYM=VALUE
Define the symbol SYM to be VALUE before assembling the input file.VALUE must be an integer constant. As in C, a leading 0x indicates ahexadecimal value, and a leading 0 indicates an octal value.
``fast''--skip preprocessing (assume source is compiler output).
-I path
Add pathto the search list for .includedirectives.
Generate stabs debugging information for each assembler line. Thismay help debugging assembler code, if the debugger can handle it.
Issue warnings when difference tables altered for long displacements.
Keep (in symbol table) local symbols, starting with `L'
-M, --mri
Assemble in MRI compatibility mode.
-o objfile
Name the object-file output from as
Fold data section into text section
Use same format as native assembler, when possible.
Announce as version
-W, --no-warn
Suppress warning messages.
Consider warnings to be fatal.
Just warn on warnings.
-- | files...
Source files to assemble, or standard input (--)
(When configured for Intel 960.)Specify which variant of the 960 architecture is the target.
(When configured for Intel 960.)Add code to collect statistics about branches taken.
(When configured for Intel 960.)Do not alter compare-and-branch instructions for long displacements;error if necessary.
(When configured for Motorola 68000).
Shorten references to undefined symbols, to one word instead of two.
(When configured for Motorola 68000).
Specify what processor in the 68000 family is the target (default 68020)

Options may be in any order, and may bebefore, after, or between file names. The order of file names issignificant.

`--' (two hyphens) by itself names the standard input fileexplicitly, as one of the files for as to assemble.

Except for `--' any command line argument that begins with ahyphen (`-') is an option. Each option changes the behavior ofas. No option changes the way another option works. Anoption is a `-' followed by one or more letters; the case ofthe letter is important. All options are optional.

The `-o' option expects exactly one file name to follow. The filename may either immediately follow the option's letter (compatiblewith older assemblers) or it may be the next command argument (GNUstandard).

These two command lines are equivalent:
as  -o  my-object-file.o  mumble.s
as  -omy-object-file.o  mumble.s



`as'entry in info; Using as: The GNU Assembler;gcc(1),ld(1).



Copyright (c) 1991, 1992 Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies.

Permission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that theentire resulting derived work is distributed under the terms of apermission notice identical to this one.

Permission is granted to copy and distribute translations of thismanual into another language, under the above conditions for modifiedversions, except that this permission notice may be included intranslations approved by the Free Software Foundation instead of inthe original English.




This document was created byman2html,using the manual pages.