1996-03-29 19:33:43 +00:00
|
|
|
.\" Copyright (c) 1991, 1992, 1996 Free Software Foundation
|
1992-01-22 00:36:44 +00:00
|
|
|
.\" See section COPYING for conditions for redistribution
|
1996-03-29 19:33:43 +00:00
|
|
|
.TH as 1 "29 March 1996" "cygnus support" "GNU Development Tools"
|
1992-01-22 00:36:44 +00:00
|
|
|
|
|
|
|
.SH NAME
|
1996-03-29 19:33:43 +00:00
|
|
|
GNU as \- the portable GNU assembler.
|
1992-01-22 00:36:44 +00:00
|
|
|
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.na
|
|
|
|
.B as
|
1995-07-06 20:39:31 +00:00
|
|
|
.RB "[\|" \-a "[\|" dhlns "\|]" \c
|
|
|
|
\&\[\|\=\c
|
|
|
|
.I file\c
|
|
|
|
\&\|]\|]
|
1992-01-22 00:36:44 +00:00
|
|
|
.RB "[\|" \-D "\|]"
|
1995-08-21 21:18:57 +00:00
|
|
|
.RB "[\|" \-\-defsym\ SYM=VAL "\|]"
|
1992-01-22 00:36:44 +00:00
|
|
|
.RB "[\|" \-f "\|]"
|
1997-08-15 18:19:27 +00:00
|
|
|
.RB "[\|" \-\-gstabs "\|]"
|
1992-01-22 00:36:44 +00:00
|
|
|
.RB "[\|" \-I
|
|
|
|
.I path\c
|
|
|
|
\&\|]
|
1992-05-05 22:00:25 +00:00
|
|
|
.RB "[\|" \-K "\|]"
|
1992-01-22 00:36:44 +00:00
|
|
|
.RB "[\|" \-L "\|]"
|
1995-08-10 21:18:21 +00:00
|
|
|
.RB "[\|" \-M\ |\ \-\-mri "\|]"
|
1992-01-22 00:36:44 +00:00
|
|
|
.RB "[\|" \-o
|
|
|
|
.I objfile\c
|
|
|
|
\&\|]
|
|
|
|
.RB "[\|" \-R "\|]"
|
|
|
|
.RB "[\|" \-v "\|]"
|
|
|
|
.RB "[\|" \-w "\|]"
|
|
|
|
.RB "[\|" \-\^\- "\ |\ " \c
|
|
|
|
.I files\c
|
|
|
|
\&\|.\|.\|.\|]
|
|
|
|
|
|
|
|
.I i960-only options:
|
|
|
|
.br
|
|
|
|
.RB "[\|" \-ACA "\||\|" \-ACA_A "\||\|" \-ACB\c
|
|
|
|
.RB "\||\|" \-ACC "\||\|" \-AKA "\||\|" \-AKB\c
|
|
|
|
.RB "\||\|" \-AKC "\||\|" \-AMC "\|]"
|
|
|
|
.RB "[\|" \-b "\|]"
|
I80960XL support (sanitized), misc cleanup:
* config/tc-i960.h (TC_COFF_SET_MACHINE): New macro. Calls tc_headers_hook.
* config/tc-i960.c (targ_has_iclass): Use I_CX | I_CX2 where I_CX was used
previously.
(tc_headers_hook): If I_CX2 is found, set flags to F_I960CA.
* config/tc-i960.c (po_hash): Declaration deleted.
(next_object_file_charP): Ditto.
(regnames, aregs, coj): Now const.
(parse_memop): Static array def_scale now const.
(md_begin): Cast away const when passing hash routines addresses of values in
regnames or aregs.
(md_longopts): Added "link-relax" and "no-relax" hyphenated forms. Continue to
accept one-word forms.
(struct tabentry, arch_tab): Moved to top level from inside md_parse_option.
Now const.
(md_show_usage): Use arch_tab to generate usage message. Print hyphenated
forms of relax options.
* config/tc-i960.h (DEFINE_I960_AOUT, TC_S_IS_*, TC_S_*_SYSPROC,
TC_S_FORCE_TO_*): Moved from here...
* config/tc-i960.c: ... to here. Changed DEFINE_I960_AOUT stuff to test
OBJ_AOUT and OBJ_BOUT directly.
* config/tc-i960.h (CTRL, COBR, COJ, REG, MEM*, FBRA, CALLJ, M1-M3, REG_OPC,
R_*, SFR, LIT, FP, OP, R, RS, RL, RSL, F, {R,F}{,L}{2,4}, M, SFR_OK, LIT_OK,
FP_OK, REG_ALIGN, MEMOP, I_*): Macros deleted.
* config/tc-i960.c (ARCH_XL): Define.
(arch_tab): Include XL.
(targ_has_sfr, targ_has_iclass): Handle XL.
(tc_headers_hook): Set flags to F_I960XL for i960XL.
1994-07-27 00:58:19 +00:00
|
|
|
.RB "[\|" \-no-relax "\|]"
|
1992-01-22 00:36:44 +00:00
|
|
|
|
|
|
|
.I m680x0-only options:
|
|
|
|
.br
|
|
|
|
.RB "[\|" \-l "\|]"
|
|
|
|
.RB "[\|" \-mc68000 "\||\|" \-mc68010 "\||\|" \-mc68020 "\|]"
|
|
|
|
.ad b
|
|
|
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
GNU \c
|
|
|
|
.B as\c
|
|
|
|
\& is really a family of assemblers.
|
|
|
|
If you use (or have used) the GNU assembler on one architecture, you
|
|
|
|
should find a fairly similar environment when you use it on another
|
|
|
|
architecture. Each version has much in common with the others,
|
|
|
|
including object file formats, most assembler directives (often called
|
|
|
|
\c
|
|
|
|
.I pseudo-ops)\c
|
|
|
|
\& and assembler syntax.
|
|
|
|
|
|
|
|
For information on the syntax and pseudo-ops used by GNU \c
|
|
|
|
.B as\c
|
|
|
|
\&, see `\|\c
|
|
|
|
.B as\c
|
|
|
|
\|' entry in \c
|
|
|
|
.B info \c
|
|
|
|
(or the manual \c
|
|
|
|
.I
|
|
|
|
.I
|
|
|
|
Using as: The GNU Assembler\c
|
|
|
|
\&).
|
|
|
|
|
|
|
|
\c
|
|
|
|
.B as\c
|
|
|
|
\& is primarily intended to assemble the output of the GNU C
|
|
|
|
compiler \c
|
|
|
|
.B gcc\c
|
|
|
|
\& for use by the linker \c
|
|
|
|
.B ld\c
|
|
|
|
\&. Nevertheless,
|
|
|
|
we've tried to make \c
|
|
|
|
.B as\c
|
|
|
|
\& assemble correctly everything that the native
|
|
|
|
assembler would.
|
|
|
|
This doesn't mean \c
|
|
|
|
.B as\c
|
|
|
|
\& always uses the same syntax as another
|
|
|
|
assembler for the same architecture; for example, we know of several
|
|
|
|
incompatible versions of 680x0 assembly language syntax.
|
|
|
|
|
|
|
|
Each time you run \c
|
|
|
|
.B as\c
|
|
|
|
\& it assembles exactly one source
|
|
|
|
program. The source program is made up of one or more files.
|
|
|
|
(The standard input is also a file.)
|
|
|
|
|
|
|
|
If \c
|
|
|
|
.B as\c
|
|
|
|
\& is given no file names it attempts to read one input file
|
|
|
|
from the \c
|
|
|
|
.B as\c
|
|
|
|
\& standard input, which is normally your terminal. You
|
|
|
|
may have to type \c
|
|
|
|
.B ctl-D\c
|
|
|
|
\& to tell \c
|
|
|
|
.B as\c
|
|
|
|
\& there is no more program
|
|
|
|
to assemble. Use `\|\c
|
|
|
|
.B \-\^\-\c
|
|
|
|
\|' if you need to explicitly name the standard input file
|
|
|
|
in your command line.
|
|
|
|
|
|
|
|
.B as\c
|
|
|
|
\& may write warnings and error messages to the standard error
|
|
|
|
file (usually your terminal). This should not happen when \c
|
|
|
|
.B as\c
|
|
|
|
\& is
|
|
|
|
run automatically by a compiler. Warnings report an assumption made so
|
|
|
|
that \c
|
|
|
|
.B as\c
|
|
|
|
\& could keep assembling a flawed program; errors report a
|
|
|
|
grave problem that stops the assembly.
|
|
|
|
|
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
1995-07-06 20:39:31 +00:00
|
|
|
.BR \-a
|
|
|
|
Turn on assembly listings. There are various suboptions.
|
|
|
|
.B d
|
|
|
|
omits debugging directives.
|
|
|
|
.B h
|
|
|
|
includes the high level source code; this is only available if the
|
|
|
|
source file can be found, and the code was compiled with
|
|
|
|
.B \-g.
|
|
|
|
.B l
|
|
|
|
includes an assembly listing.
|
|
|
|
.B n
|
|
|
|
omits forms processing.
|
|
|
|
.B s
|
|
|
|
includes a symbol listing.
|
|
|
|
.B =
|
|
|
|
.I file
|
|
|
|
sets the listing file name; this must be the last suboption.
|
|
|
|
The default suboptions are
|
|
|
|
.B hls.
|
1992-01-22 00:36:44 +00:00
|
|
|
.TP
|
|
|
|
.B \-D
|
|
|
|
This option is accepted only for script compatibility with calls to
|
|
|
|
other assemblers; it has no effect on \c
|
|
|
|
.B as\c
|
|
|
|
\&.
|
|
|
|
.TP
|
1995-08-21 21:18:57 +00:00
|
|
|
.B \-\-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 a
|
|
|
|
hexadecimal value, and a leading 0 indicates an octal value.
|
|
|
|
.TP
|
1992-01-22 00:36:44 +00:00
|
|
|
.B \-f
|
|
|
|
``fast''--skip preprocessing (assume source is compiler output).
|
|
|
|
.TP
|
|
|
|
.BI "\-I\ " path
|
|
|
|
Add
|
|
|
|
.I path
|
|
|
|
to the search list for
|
|
|
|
.B .include
|
|
|
|
directives.
|
|
|
|
.TP
|
1997-08-15 18:19:27 +00:00
|
|
|
.B \-\-gstabs
|
|
|
|
Generate stabs debugging information for each assembler line. This
|
|
|
|
may help debugging assembler code, if the debugger can handle it.
|
|
|
|
.TP
|
1992-05-05 22:00:25 +00:00
|
|
|
.B \-K
|
1992-01-22 00:36:44 +00:00
|
|
|
Issue warnings when difference tables altered for long displacements.
|
|
|
|
.TP
|
|
|
|
.B \-L
|
|
|
|
Keep (in symbol table) local symbols, starting with `\|\c
|
|
|
|
.B L\c
|
|
|
|
\|'
|
|
|
|
.TP
|
1995-08-10 21:18:21 +00:00
|
|
|
.B \-M, \-\-mri
|
|
|
|
Assemble in MRI compatibility mode.
|
|
|
|
.TP
|
1992-01-22 00:36:44 +00:00
|
|
|
.BI "\-o\ " objfile
|
|
|
|
Name the object-file output from \c
|
|
|
|
.B as
|
|
|
|
.TP
|
|
|
|
.B \-R
|
|
|
|
Fold data section into text section
|
|
|
|
.TP
|
|
|
|
.B \-v
|
|
|
|
Announce \c
|
|
|
|
.B as\c
|
|
|
|
\& version
|
|
|
|
.TP
|
|
|
|
.B \-W
|
|
|
|
Suppress warning messages
|
|
|
|
.TP
|
|
|
|
.IR "\-\^\-" "\ |\ " "files\|.\|.\|."
|
|
|
|
Source files to assemble, or standard input (\c
|
|
|
|
.BR "\-\^\-" ")"
|
|
|
|
.TP
|
|
|
|
.BI \-A var
|
|
|
|
.I
|
|
|
|
(When configured for Intel 960.)
|
|
|
|
Specify which variant of the 960 architecture is the target.
|
|
|
|
.TP
|
|
|
|
.B \-b
|
|
|
|
.I
|
|
|
|
(When configured for Intel 960.)
|
|
|
|
Add code to collect statistics about branches taken.
|
|
|
|
.TP
|
I80960XL support (sanitized), misc cleanup:
* config/tc-i960.h (TC_COFF_SET_MACHINE): New macro. Calls tc_headers_hook.
* config/tc-i960.c (targ_has_iclass): Use I_CX | I_CX2 where I_CX was used
previously.
(tc_headers_hook): If I_CX2 is found, set flags to F_I960CA.
* config/tc-i960.c (po_hash): Declaration deleted.
(next_object_file_charP): Ditto.
(regnames, aregs, coj): Now const.
(parse_memop): Static array def_scale now const.
(md_begin): Cast away const when passing hash routines addresses of values in
regnames or aregs.
(md_longopts): Added "link-relax" and "no-relax" hyphenated forms. Continue to
accept one-word forms.
(struct tabentry, arch_tab): Moved to top level from inside md_parse_option.
Now const.
(md_show_usage): Use arch_tab to generate usage message. Print hyphenated
forms of relax options.
* config/tc-i960.h (DEFINE_I960_AOUT, TC_S_IS_*, TC_S_*_SYSPROC,
TC_S_FORCE_TO_*): Moved from here...
* config/tc-i960.c: ... to here. Changed DEFINE_I960_AOUT stuff to test
OBJ_AOUT and OBJ_BOUT directly.
* config/tc-i960.h (CTRL, COBR, COJ, REG, MEM*, FBRA, CALLJ, M1-M3, REG_OPC,
R_*, SFR, LIT, FP, OP, R, RS, RL, RSL, F, {R,F}{,L}{2,4}, M, SFR_OK, LIT_OK,
FP_OK, REG_ALIGN, MEMOP, I_*): Macros deleted.
* config/tc-i960.c (ARCH_XL): Define.
(arch_tab): Include XL.
(targ_has_sfr, targ_has_iclass): Handle XL.
(tc_headers_hook): Set flags to F_I960XL for i960XL.
1994-07-27 00:58:19 +00:00
|
|
|
.B \-no-relax
|
1992-01-22 00:36:44 +00:00
|
|
|
.I
|
|
|
|
(When configured for Intel 960.)
|
|
|
|
Do not alter compare-and-branch instructions for long displacements;
|
|
|
|
error if necessary.
|
|
|
|
.TP
|
|
|
|
.B \-l
|
|
|
|
.I
|
|
|
|
(When configured for Motorola 68000).
|
|
|
|
.br
|
|
|
|
Shorten references to undefined symbols, to one word instead of two.
|
|
|
|
.TP
|
|
|
|
.BR "\-mc68000" "\||\|" "\-mc68010" "\||\|" "\-mc68020"
|
|
|
|
.I
|
|
|
|
(When configured for Motorola 68000).
|
|
|
|
.br
|
|
|
|
Specify what processor in the 68000 family is the target (default 68020)
|
|
|
|
|
|
|
|
.PP
|
|
|
|
Options may be in any order, and may be
|
|
|
|
before, after, or between file names. The order of file names is
|
|
|
|
significant.
|
|
|
|
|
|
|
|
`\|\c
|
|
|
|
.B \-\^\-\c
|
|
|
|
\|' (two hyphens) by itself names the standard input file
|
|
|
|
explicitly, as one of the files for \c
|
|
|
|
.B as\c
|
|
|
|
\& to assemble.
|
|
|
|
|
|
|
|
Except for `\|\c
|
|
|
|
.B \-\^\-\c
|
|
|
|
\|' any command line argument that begins with a
|
|
|
|
hyphen (`\|\c
|
|
|
|
.B \-\c
|
|
|
|
\|') is an option. Each option changes the behavior of
|
|
|
|
\c
|
|
|
|
.B as\c
|
|
|
|
\&. No option changes the way another option works. An
|
|
|
|
option is a `\|\c
|
|
|
|
.B \-\c
|
|
|
|
\|' followed by one or more letters; the case of
|
|
|
|
the letter is important. All options are optional.
|
|
|
|
|
|
|
|
The `\|\c
|
|
|
|
.B \-o\c
|
|
|
|
\|' option expects exactly one file name to follow. The file
|
|
|
|
name may either immediately follow the option's letter (compatible
|
|
|
|
with older assemblers) or it may be the next command argument (GNU
|
|
|
|
standard).
|
|
|
|
|
|
|
|
These two command lines are equivalent:
|
|
|
|
.br
|
|
|
|
.B
|
|
|
|
as\ \ \-o\ \ my\-object\-file.o\ \ mumble.s
|
|
|
|
.br
|
|
|
|
.B
|
|
|
|
as\ \ \-omy\-object\-file.o\ \ mumble.s
|
|
|
|
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.RB "`\|" as "\|'"
|
|
|
|
entry in
|
|
|
|
.B
|
|
|
|
info\c
|
|
|
|
\&;
|
|
|
|
.I
|
|
|
|
Using as: The GNU Assembler\c
|
|
|
|
\&;
|
|
|
|
.BR gcc "(" 1 "),"
|
|
|
|
.BR ld "(" 1 ")."
|
|
|
|
|
|
|
|
.SH COPYING
|
|
|
|
Copyright (c) 1991, 1992 Free Software Foundation, Inc.
|
|
|
|
.PP
|
|
|
|
Permission is granted to make and distribute verbatim copies of
|
|
|
|
this manual provided the copyright notice and this permission notice
|
|
|
|
are preserved on all copies.
|
|
|
|
.PP
|
|
|
|
Permission is granted to copy and distribute modified versions of this
|
|
|
|
manual under the conditions for verbatim copying, provided that the
|
|
|
|
entire resulting derived work is distributed under the terms of a
|
|
|
|
permission notice identical to this one.
|
|
|
|
.PP
|
|
|
|
Permission is granted to copy and distribute translations of this
|
|
|
|
manual into another language, under the above conditions for modified
|
|
|
|
versions, except that this permission notice may be included in
|
|
|
|
translations approved by the Free Software Foundation instead of in
|
|
|
|
the original English.
|