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