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