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