x
[deliverable/binutils-gdb.git] / gas / doc / as.1
CommitLineData
ead077d5
RP
1.\" Copyright (c) 1991, 1992 Free Software Foundation
2.\" See section COPYING for conditions for redistribution
3.TH as 1 "21 January 1992" "cygnus support" "GNU Development Tools"
4
5.SH NAME
6GNU as\-\-the portable GNU assembler.
7
8.SH SYNOPSIS
9.na
10.B as
11.RB "[\|" \-a "\||\|" \-al "\||\|" -as\c
12\&\|]
13.RB "[\|" \-D "\|]"
14.RB "[\|" \-f "\|]"
15.RB "[\|" \-I
16.I path\c
17\&\|]
bf85ce3e 18.RB "[\|" \-K "\|]"
ead077d5
RP
19.RB "[\|" \-L "\|]"
20.RB "[\|" \-o
21.I objfile\c
22\&\|]
23.RB "[\|" \-R "\|]"
24.RB "[\|" \-v "\|]"
25.RB "[\|" \-w "\|]"
26.RB "[\|" \-\^\- "\ |\ " \c
27.I files\c
28\&\|.\|.\|.\|]
29
30.I i960-only options:
31.br
32.RB "[\|" \-ACA "\||\|" \-ACA_A "\||\|" \-ACB\c
33.RB "\||\|" \-ACC "\||\|" \-AKA "\||\|" \-AKB\c
34.RB "\||\|" \-AKC "\||\|" \-AMC "\|]"
35.RB "[\|" \-b "\|]"
36.RB "[\|" \-norelax "\|]"
37
38.I m680x0-only options:
39.br
40.RB "[\|" \-l "\|]"
41.RB "[\|" \-mc68000 "\||\|" \-mc68010 "\||\|" \-mc68020 "\|]"
42.ad b
43
44.SH DESCRIPTION
45GNU \c
46.B as\c
47\& is really a family of assemblers.
48If you use (or have used) the GNU assembler on one architecture, you
49should find a fairly similar environment when you use it on another
50architecture. Each version has much in common with the others,
51including object file formats, most assembler directives (often called
52\c
53.I pseudo-ops)\c
54\& and assembler syntax.
55
56For information on the syntax and pseudo-ops used by GNU \c
57.B as\c
58\&, see `\|\c
59.B as\c
60\|' entry in \c
61.B info \c
62(or the manual \c
63.I
64.I
65Using as: The GNU Assembler\c
66\&).
67
68\c
69.B as\c
70\& is primarily intended to assemble the output of the GNU C
71compiler \c
72.B gcc\c
73\& for use by the linker \c
74.B ld\c
75\&. Nevertheless,
76we've tried to make \c
77.B as\c
78\& assemble correctly everything that the native
79assembler would.
80This doesn't mean \c
81.B as\c
82\& always uses the same syntax as another
83assembler for the same architecture; for example, we know of several
84incompatible versions of 680x0 assembly language syntax.
85
86Each time you run \c
87.B as\c
88\& it assembles exactly one source
89program. The source program is made up of one or more files.
90(The standard input is also a file.)
91
92If \c
93.B as\c
94\& is given no file names it attempts to read one input file
95from the \c
96.B as\c
97\& standard input, which is normally your terminal. You
98may have to type \c
99.B ctl-D\c
100\& to tell \c
101.B as\c
102\& there is no more program
103to assemble. Use `\|\c
104.B \-\^\-\c
105\|' if you need to explicitly name the standard input file
106in your command line.
107
108.B as\c
109\& may write warnings and error messages to the standard error
110file (usually your terminal). This should not happen when \c
111.B as\c
112\& is
113run automatically by a compiler. Warnings report an assumption made so
114that \c
115.B as\c
116\& could keep assembling a flawed program; errors report a
117grave problem that stops the assembly.
118
119.SH OPTIONS
120.TP
121.BR \-a \||\| \-al \||\| \-as
122Turn on assembly listings; `\|\c
123.B \-al\c
124\&\|', listing only, `\|\c
125.B \-as\c
126\&\|', symbols
127only, `\|\c
128.B \-a\c
129\&\|', everything.
130.TP
131.B \-D
132This option is accepted only for script compatibility with calls to
133other assemblers; it has no effect on \c
134.B as\c
135\&.
136.TP
137.B \-f
138``fast''--skip preprocessing (assume source is compiler output).
139.TP
140.BI "\-I\ " path
141Add
142.I path
143to the search list for
144.B .include
145directives.
146.TP
bf85ce3e 147.B \-K
ead077d5
RP
148Issue warnings when difference tables altered for long displacements.
149.TP
150.B \-L
151Keep (in symbol table) local symbols, starting with `\|\c
152.B L\c
153\|'
154.TP
155.BI "\-o\ " objfile
156Name the object-file output from \c
157.B as
158.TP
159.B \-R
160Fold data section into text section
161.TP
162.B \-v
163Announce \c
164.B as\c
165\& version
166.TP
167.B \-W
168Suppress warning messages
169.TP
170.IR "\-\^\-" "\ |\ " "files\|.\|.\|."
171Source files to assemble, or standard input (\c
172.BR "\-\^\-" ")"
173.TP
174.BI \-A var
175.I
176(When configured for Intel 960.)
177Specify which variant of the 960 architecture is the target.
178.TP
179.B \-b
180.I
181(When configured for Intel 960.)
182Add code to collect statistics about branches taken.
183.TP
184.B \-norelax
185.I
186(When configured for Intel 960.)
187Do not alter compare-and-branch instructions for long displacements;
188error if necessary.
189.TP
190.B \-l
191.I
192(When configured for Motorola 68000).
193.br
194Shorten references to undefined symbols, to one word instead of two.
195.TP
196.BR "\-mc68000" "\||\|" "\-mc68010" "\||\|" "\-mc68020"
197.I
198(When configured for Motorola 68000).
199.br
200Specify what processor in the 68000 family is the target (default 68020)
201
202.PP
203Options may be in any order, and may be
204before, after, or between file names. The order of file names is
205significant.
206
207`\|\c
208.B \-\^\-\c
209\|' (two hyphens) by itself names the standard input file
210explicitly, as one of the files for \c
211.B as\c
212\& to assemble.
213
214Except for `\|\c
215.B \-\^\-\c
216\|' any command line argument that begins with a
217hyphen (`\|\c
218.B \-\c
219\|') is an option. Each option changes the behavior of
220\c
221.B as\c
222\&. No option changes the way another option works. An
223option is a `\|\c
224.B \-\c
225\|' followed by one or more letters; the case of
226the letter is important. All options are optional.
227
228The `\|\c
229.B \-o\c
230\|' option expects exactly one file name to follow. The file
231name may either immediately follow the option's letter (compatible
232with older assemblers) or it may be the next command argument (GNU
233standard).
234
235These two command lines are equivalent:
236.br
237.B
238as\ \ \-o\ \ my\-object\-file.o\ \ mumble.s
239.br
240.B
241as\ \ \-omy\-object\-file.o\ \ mumble.s
242
243.SH "SEE ALSO"
244.RB "`\|" as "\|'"
245entry in
246.B
247info\c
248\&;
249.I
250Using as: The GNU Assembler\c
251\&;
252.BR gcc "(" 1 "),"
253.BR ld "(" 1 ")."
254
255.SH COPYING
256Copyright (c) 1991, 1992 Free Software Foundation, Inc.
257.PP
258Permission is granted to make and distribute verbatim copies of
259this manual provided the copyright notice and this permission notice
260are preserved on all copies.
261.PP
262Permission is granted to copy and distribute modified versions of this
263manual under the conditions for verbatim copying, provided that the
264entire resulting derived work is distributed under the terms of a
265permission notice identical to this one.
266.PP
267Permission is granted to copy and distribute translations of this
268manual into another language, under the above conditions for modified
269versions, except that this permission notice may be included in
270translations approved by the Free Software Foundation instead of in
271the original English.
This page took 0.066001 seconds and 4 git commands to generate.