Add GNU Free Documentation License
[deliverable/binutils-gdb.git] / gas / doc / as.1
CommitLineData
cf055d54 1.\" Copyright (c) 1991, 1992, 1996, 1997, 1998, 2000 Free Software Foundation
252b5132 2.\" See section COPYING for conditions for redistribution
cf055d54 3.TH as 1 "29 March 1996" "Free Software Foundation" "GNU Development Tools"
252b5132
RH
4
5.SH NAME
6GNU as \- the portable GNU assembler.
7
8.SH SYNOPSIS
9.na
10.B as
11.RB "[\|" \-a "[\|" dhlns "\|]" \c
d9b7d820 12\&[\|\=\c
252b5132
RH
13.I file\c
14\&\|]\|]
15.RB "[\|" \-D "\|]"
16.RB "[\|" \-\-defsym\ SYM=VAL "\|]"
17.RB "[\|" \-f "\|]"
18.RB "[\|" \-\-gstabs "\|]"
19.RB "[\|" \-I
20.I path\c
21\&\|]
22.RB "[\|" \-K "\|]"
23.RB "[\|" \-L "\|]"
24.RB "[\|" \-M\ |\ \-\-mri "\|]"
25.RB "[\|" \-o
26.I objfile\c
27\&\|]
28.RB "[\|" \-R "\|]"
29.RB "[\|" \-\-traditional\-format "\|]"
30.RB "[\|" \-v "\|]"
31.RB "[\|" \-w "\|]"
32.RB "[\|" \-\^\- "\ |\ " \c
33.I files\c
34\&\|.\|.\|.\|]
35
36.I i960-only options:
37.br
38.RB "[\|" \-ACA "\||\|" \-ACA_A "\||\|" \-ACB\c
39.RB "\||\|" \-ACC "\||\|" \-AKA "\||\|" \-AKB\c
40.RB "\||\|" \-AKC "\||\|" \-AMC "\|]"
41.RB "[\|" \-b "\|]"
42.RB "[\|" \-no-relax "\|]"
43
44.I m680x0-only options:
45.br
46.RB "[\|" \-l "\|]"
47.RB "[\|" \-mc68000 "\||\|" \-mc68010 "\||\|" \-mc68020 "\|]"
48.ad b
49
50.SH DESCRIPTION
51GNU \c
52.B as\c
53\& is really a family of assemblers.
54If you use (or have used) the GNU assembler on one architecture, you
55should find a fairly similar environment when you use it on another
56architecture. Each version has much in common with the others,
57including object file formats, most assembler directives (often called
58\c
59.I pseudo-ops)\c
60\& and assembler syntax.
61
62For information on the syntax and pseudo-ops used by GNU \c
63.B as\c
64\&, see `\|\c
65.B as\c
66\|' entry in \c
67.B info \c
68(or the manual \c
69.I
70.I
71Using as: The GNU Assembler\c
72\&).
73
74\c
75.B as\c
76\& is primarily intended to assemble the output of the GNU C
77compiler \c
78.B gcc\c
79\& for use by the linker \c
80.B ld\c
81\&. Nevertheless,
82we've tried to make \c
83.B as\c
84\& assemble correctly everything that the native
85assembler would.
86This doesn't mean \c
87.B as\c
88\& always uses the same syntax as another
89assembler for the same architecture; for example, we know of several
90incompatible versions of 680x0 assembly language syntax.
91
92Each time you run \c
93.B as\c
94\& it assembles exactly one source
95program. The source program is made up of one or more files.
96(The standard input is also a file.)
97
98If \c
99.B as\c
100\& is given no file names it attempts to read one input file
101from the \c
102.B as\c
103\& standard input, which is normally your terminal. You
104may have to type \c
105.B ctl-D\c
106\& to tell \c
107.B as\c
108\& there is no more program
109to assemble. Use `\|\c
110.B \-\^\-\c
111\|' if you need to explicitly name the standard input file
112in your command line.
113
114.B as\c
115\& may write warnings and error messages to the standard error
116file (usually your terminal). This should not happen when \c
117.B as\c
118\& is
119run automatically by a compiler. Warnings report an assumption made so
120that \c
121.B as\c
122\& could keep assembling a flawed program; errors report a
123grave problem that stops the assembly.
124
125.SH OPTIONS
126.TP
127.BR \-a
128Turn on assembly listings. There are various suboptions.
129.B d
130omits debugging directives.
131.B h
132includes the high level source code; this is only available if the
133source file can be found, and the code was compiled with
134.B \-g.
135.B l
136includes an assembly listing.
137.B n
138omits forms processing.
139.B s
140includes a symbol listing.
141.B =
142.I file
143sets the listing file name; this must be the last suboption.
144The default suboptions are
145.B hls.
146.TP
147.B \-D
148This option is accepted only for script compatibility with calls to
149other assemblers; it has no effect on \c
150.B as\c
151\&.
152.TP
153.B \-\-defsym SYM=VALUE
154Define the symbol SYM to be VALUE before assembling the input file.
155VALUE must be an integer constant. As in C, a leading 0x indicates a
156hexadecimal value, and a leading 0 indicates an octal value.
157.TP
158.B \-f
159``fast''--skip preprocessing (assume source is compiler output).
160.TP
161.BI "\-I\ " path
162Add
163.I path
164to the search list for
165.B .include
166directives.
167.TP
168.B \-\-gstabs
169Generate stabs debugging information for each assembler line. This
170may help debugging assembler code, if the debugger can handle it.
171.TP
172.B \-K
173Issue warnings when difference tables altered for long displacements.
174.TP
175.B \-L
176Keep (in symbol table) local symbols, starting with `\|\c
177.B L\c
178\|'
179.TP
180.B \-M, \-\-mri
181Assemble in MRI compatibility mode.
182.TP
183.BI "\-o\ " objfile
184Name the object-file output from \c
185.B as
186.TP
187.B \-R
188Fold data section into text section
189.TP
190.B \-\-traditional\-format
191Use same format as native assembler, when possible.
192.TP
193.B \-v
194Announce \c
195.B as\c
196\& version
197.TP
2bdd6cf5
GK
198.B \-W, \-\-no-warn
199Suppress warning messages.
200.TP
201.B \-\-fatal\-warnings
202Consider warnings to be fatal.
203.TP
204.B \-\-warn
205Just warn on warnings.
252b5132
RH
206.TP
207.IR "\-\^\-" "\ |\ " "files\|.\|.\|."
208Source files to assemble, or standard input (\c
209.BR "\-\^\-" ")"
210.TP
211.BI \-A var
212.I
213(When configured for Intel 960.)
214Specify which variant of the 960 architecture is the target.
215.TP
216.B \-b
217.I
218(When configured for Intel 960.)
219Add code to collect statistics about branches taken.
220.TP
221.B \-no-relax
222.I
223(When configured for Intel 960.)
224Do not alter compare-and-branch instructions for long displacements;
225error if necessary.
226.TP
227.B \-l
228.I
229(When configured for Motorola 68000).
230.br
231Shorten references to undefined symbols, to one word instead of two.
232.TP
233.BR "\-mc68000" "\||\|" "\-mc68010" "\||\|" "\-mc68020"
234.I
235(When configured for Motorola 68000).
236.br
237Specify what processor in the 68000 family is the target (default 68020)
238
239.PP
240Options may be in any order, and may be
241before, after, or between file names. The order of file names is
242significant.
243
244`\|\c
245.B \-\^\-\c
246\|' (two hyphens) by itself names the standard input file
247explicitly, as one of the files for \c
248.B as\c
249\& to assemble.
250
251Except for `\|\c
252.B \-\^\-\c
253\|' any command line argument that begins with a
254hyphen (`\|\c
255.B \-\c
256\|') is an option. Each option changes the behavior of
257\c
258.B as\c
259\&. No option changes the way another option works. An
260option is a `\|\c
261.B \-\c
262\|' followed by one or more letters; the case of
263the letter is important. All options are optional.
264
265The `\|\c
266.B \-o\c
267\|' option expects exactly one file name to follow. The file
268name may either immediately follow the option's letter (compatible
269with older assemblers) or it may be the next command argument (GNU
270standard).
271
272These two command lines are equivalent:
273.br
274.B
275as\ \ \-o\ \ my\-object\-file.o\ \ mumble.s
276.br
277.B
278as\ \ \-omy\-object\-file.o\ \ mumble.s
279
280.SH "SEE ALSO"
281.RB "`\|" as "\|'"
282entry in
283.B
284info\c
285\&;
286.I
287Using as: The GNU Assembler\c
288\&;
289.BR gcc "(" 1 "),"
290.BR ld "(" 1 ")."
291
292.SH COPYING
cf055d54
NC
293Copyright (c) 1991, 1992, 2000 Free Software Foundation, Inc.
294.PP
295This document is distributed under the terms of the GNU Free
296Documenation License. That license is described in the GNU Free
297Documentation License section.
298
299.SH GNU Free Documentation License
300 Version 1.1, March 2000
301
302 Copyright (C) 2000 Free Software Foundation, Inc.
303 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
304
305 Everyone is permitted to copy and distribute verbatim
306 copies of this license document, but changing it is
307 not allowed.
308.PP
3090. PREAMBLE
310.PP
311The purpose of this License is to make a manual, textbook, or other
312written document "free" in the sense of freedom: to assure everyone
313the effective freedom to copy and redistribute it, with or without
314modifying it, either commercially or noncommercially. Secondarily,
315this License preserves for the author and publisher a way to get
316credit for their work, while not being considered responsible for
317modifications made by others.
318.PP
319This License is a kind of "copyleft", which means that derivative
320works of the document must themselves be free in the same sense. It
321complements the GNU General Public License, which is a copyleft
322license designed for free software.
323.PP
324We have designed this License in order to use it for manuals for free
325software, because free software needs free documentation: a free
326program should come with manuals providing the same freedoms that the
327software does. But this License is not limited to software manuals;
328it can be used for any textual work, regardless of subject matter or
329whether it is published as a printed book. We recommend this License
330principally for works whose purpose is instruction or reference.
331.PP
3321. APPLICABILITY AND DEFINITIONS
333.PP
334This License applies to any manual or other work that contains a
335notice placed by the copyright holder saying it can be distributed
336under the terms of this License. The "Document", below, refers to any
337such manual or work. Any member of the public is a licensee, and is
338addressed as "you".
339.PP
340A "Modified Version" of the Document means any work containing the
341Document or a portion of it, either copied verbatim, or with
342modifications and/or translated into another language.
343.PP
344A "Secondary Section" is a named appendix or a front-matter section of
345the Document that deals exclusively with the relationship of the
346publishers or authors of the Document to the Document's overall subject
347(or to related matters) and contains nothing that could fall directly
348within that overall subject. (For example, if the Document is in part a
349textbook of mathematics, a Secondary Section may not explain any
350mathematics.) The relationship could be a matter of historical
351connection with the subject or with related matters, or of legal,
352commercial, philosophical, ethical or political position regarding
353them.
354.PP
355The "Invariant Sections" are certain Secondary Sections whose titles
356are designated, as being those of Invariant Sections, in the notice
357that says that the Document is released under this License.
358.PP
359The "Cover Texts" are certain short passages of text that are listed,
360as Front-Cover Texts or Back-Cover Texts, in the notice that says that
361the Document is released under this License.
362.PP
363A "Transparent" copy of the Document means a machine-readable copy,
364represented in a format whose specification is available to the
365general public, whose contents can be viewed and edited directly and
366straightforwardly with generic text editors or (for images composed of
367pixels) generic paint programs or (for drawings) some widely available
368drawing editor, and that is suitable for input to text formatters or
369for automatic translation to a variety of formats suitable for input
370to text formatters. A copy made in an otherwise Transparent file
371format whose markup has been designed to thwart or discourage
372subsequent modification by readers is not Transparent. A copy that is
373not "Transparent" is called "Opaque".
374.PP
375Examples of suitable formats for Transparent copies include plain
376ASCII without markup, Texinfo input format, LaTeX input format, SGML
377or XML using a publicly available DTD, and standard-conforming simple
378HTML designed for human modification. Opaque formats include
379PostScript, PDF, proprietary formats that can be read and edited only
380by proprietary word processors, SGML or XML for which the DTD and/or
381processing tools are not generally available, and the
382machine-generated HTML produced by some word processors for output
383purposes only.
384.PP
385The "Title Page" means, for a printed book, the title page itself,
386plus such following pages as are needed to hold, legibly, the material
387this License requires to appear in the title page. For works in
388formats which do not have any title page as such, "Title Page" means
389the text near the most prominent appearance of the work's title,
390preceding the beginning of the body of the text.
391.PP
3922. VERBATIM COPYING
393.PP
394You may copy and distribute the Document in any medium, either
395commercially or noncommercially, provided that this License, the
396copyright notices, and the license notice saying this License applies
397to the Document are reproduced in all copies, and that you add no other
398conditions whatsoever to those of this License. You may not use
399technical measures to obstruct or control the reading or further
400copying of the copies you make or distribute. However, you may accept
401compensation in exchange for copies. If you distribute a large enough
402number of copies you must also follow the conditions in section 3.
403.PP
404You may also lend copies, under the same conditions stated above, and
405you may publicly display copies.
406.PP
4073. COPYING IN QUANTITY
408.PP
409If you publish printed copies of the Document numbering more than 100,
410and the Document's license notice requires Cover Texts, you must enclose
411the copies in covers that carry, clearly and legibly, all these Cover
412Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
413the back cover. Both covers must also clearly and legibly identify
414you as the publisher of these copies. The front cover must present
415the full title with all words of the title equally prominent and
416visible. You may add other material on the covers in addition.
417Copying with changes limited to the covers, as long as they preserve
418the title of the Document and satisfy these conditions, can be treated
419as verbatim copying in other respects.
420.PP
421If the required texts for either cover are too voluminous to fit
422legibly, you should put the first ones listed (as many as fit
423reasonably) on the actual cover, and continue the rest onto adjacent
424pages.
425.PP
426If you publish or distribute Opaque copies of the Document numbering
427more than 100, you must either include a machine-readable Transparent
428copy along with each Opaque copy, or state in or with each Opaque copy
429a publicly-accessible computer-network location containing a complete
430Transparent copy of the Document, free of added material, which the
431general network-using public has access to download anonymously at no
432charge using public-standard network protocols. If you use the latter
433option, you must take reasonably prudent steps, when you begin
434distribution of Opaque copies in quantity, to ensure that this
435Transparent copy will remain thus accessible at the stated location
436until at least one year after the last time you distribute an Opaque
437copy (directly or through your agents or retailers) of that edition to
438the public.
439.PP
440It is requested, but not required, that you contact the authors of the
441Document well before redistributing any large number of copies, to give
442them a chance to provide you with an updated version of the Document.
443.PP
4444. MODIFICATIONS
445.PP
446You may copy and distribute a Modified Version of the Document under
447the conditions of sections 2 and 3 above, provided that you release
448the Modified Version under precisely this License, with the Modified
449Version filling the role of the Document, thus licensing distribution
450and modification of the Modified Version to whoever possesses a copy
451of it. In addition, you must do these things in the Modified Version:
452.PP
453A. Use in the Title Page (and on the covers, if any) a title distinct
454from that of the Document, and from those of previous versions
455(which should, if there were any, be listed in the History section
456of the Document). You may use the same title as a previous version
457if the original publisher of that version gives permission.
458.PP
459B. List on the Title Page, as authors, one or more persons or entities
460responsible for authorship of the modifications in the Modified
461Version, together with at least five of the principal authors of the
462Document (all of its principal authors, if it has less than five).
463.PP
464C. State on the Title page the name of the publisher of the
465Modified Version, as the publisher.
466.PP
467D. Preserve all the copyright notices of the Document.
468.PP
469E. Add an appropriate copyright notice for your modifications
470adjacent to the other copyright notices.
471.PP
472F. Include, immediately after the copyright notices, a license notice
473giving the public permission to use the Modified Version under the
474terms of this License, in the form shown in the Addendum below.
475Preserve in that license notice the full lists of Invariant Sections
476and required Cover Texts given in the Document's license notice.
477.PP
478H. Include an unaltered copy of this License.
479.PP
480I. Preserve the section entitled "History", and its title, and add to
481it an item stating at least the title, year, new authors, and
482publisher of the Modified Version as given on the Title Page. If
483there is no section entitled "History" in the Document, create one
484stating the title, year, authors, and publisher of the Document as
485given on its Title Page, then add an item describing the Modified
486Version as stated in the previous sentence.
487.PP
488J. Preserve the network location, if any, given in the Document for
489public access to a Transparent copy of the Document, and likewise
490the network locations given in the Document for previous versions
491it was based on. These may be placed in the "History" section.
492You may omit a network location for a work that was published at
493least four years before the Document itself, or if the original
494publisher of the version it refers to gives permission.
495.PP
496K. In any section entitled "Acknowledgements" or "Dedications",
497preserve the section's title, and preserve in the section all the
498substance and tone of each of the contributor acknowledgements
499and/or dedications given therein.
500.PP
501L. Preserve all the Invariant Sections of the Document,
502unaltered in their text and in their titles. Section numbers
503or the equivalent are not considered part of the section titles.
504.PP
505M. Delete any section entitled "Endorsements". Such a section
506may not be included in the Modified Version.
507.PP
508N. Do not retitle any existing section as "Endorsements"
509or to conflict in title with any Invariant Section.
510.PP
511If the Modified Version includes new front-matter sections or
512appendices that qualify as Secondary Sections and contain no material
513copied from the Document, you may at your option designate some or all
514of these sections as invariant. To do this, add their titles to the
515list of Invariant Sections in the Modified Version's license notice.
516These titles must be distinct from any other section titles.
517.PP
518You may add a section entitled "Endorsements", provided it contains
519nothing but endorsements of your Modified Version by various
520parties--for example, statements of peer review or that the text has
521been approved by an organization as the authoritative definition of a
522standard.
523.PP
524You may add a passage of up to five words as a Front-Cover Text, and a
525passage of up to 25 words as a Back-Cover Text, to the end of the list
526of Cover Texts in the Modified Version. Only one passage of
527Front-Cover Text and one of Back-Cover Text may be added by (or
528through arrangements made by) any one entity. If the Document already
529includes a cover text for the same cover, previously added by you or
530by arrangement made by the same entity you are acting on behalf of,
531you may not add another; but you may replace the old one, on explicit
532permission from the previous publisher that added the old one.
533.PP
534The author(s) and publisher(s) of the Document do not by this License
535give permission to use their names for publicity for or to assert or
536imply endorsement of any Modified Version.
537.PP
538
5395. COMBINING DOCUMENTS
540.PP
541You may combine the Document with other documents released under this
542License, under the terms defined in section 4 above for modified
543versions, provided that you include in the combination all of the
544Invariant Sections of all of the original documents, unmodified, and
545list them all as Invariant Sections of your combined work in its
546license notice.
547.PP
548The combined work need only contain one copy of this License, and
549multiple identical Invariant Sections may be replaced with a single
550copy. If there are multiple Invariant Sections with the same name but
551different contents, make the title of each such section unique by
552adding at the end of it, in parentheses, the name of the original
553author or publisher of that section if known, or else a unique number.
554Make the same adjustment to the section titles in the list of
555Invariant Sections in the license notice of the combined work.
556.PP
557In the combination, you must combine any sections entitled "History"
558in the various original documents, forming one section entitled
559"History"; likewise combine any sections entitled "Acknowledgements",
560and any sections entitled "Dedications". You must delete all sections
561entitled "Endorsements."
562.PP
563
5646. COLLECTIONS OF DOCUMENTS
565.PP
566You may make a collection consisting of the Document and other documents
567released under this License, and replace the individual copies of this
568License in the various documents with a single copy that is included in
569the collection, provided that you follow the rules of this License for
570verbatim copying of each of the documents in all other respects.
571.PP
572You may extract a single document from such a collection, and distribute
573it individually under this License, provided you insert a copy of this
574License into the extracted document, and follow this License in all
575other respects regarding verbatim copying of that document.
576.PP
577
5787. AGGREGATION WITH INDEPENDENT WORKS
579.PP
580A compilation of the Document or its derivatives with other separate
581and independent documents or works, in or on a volume of a storage or
582distribution medium, does not as a whole count as a Modified Version
583of the Document, provided no compilation copyright is claimed for the
584compilation. Such a compilation is called an "aggregate", and this
585License does not apply to the other self-contained works thus compiled
586with the Document, on account of their being thus compiled, if they
587are not themselves derivative works of the Document.
588.PP
589If the Cover Text requirement of section 3 is applicable to these
590copies of the Document, then if the Document is less than one quarter
591of the entire aggregate, the Document's Cover Texts may be placed on
592covers that surround only the Document within the aggregate.
593Otherwise they must appear on covers around the whole aggregate.
594.PP
595
5968. TRANSLATION
597.PP
598Translation is considered a kind of modification, so you may
599distribute translations of the Document under the terms of section 4.
600Replacing Invariant Sections with translations requires special
601permission from their copyright holders, but you may include
602translations of some or all Invariant Sections in addition to the
603original versions of these Invariant Sections. You may include a
604translation of this License provided that you also include the
605original English version of this License. In case of a disagreement
606between the translation and the original English version of this
607License, the original English version will prevail.
608.PP
609
6109. TERMINATION
611.PP
612You may not copy, modify, sublicense, or distribute the Document except
613as expressly provided for under this License. Any other attempt to
614copy, modify, sublicense or distribute the Document is void, and will
615automatically terminate your rights under this License. However,
616parties who have received copies, or rights, from you under this
617License will not have their licenses terminated so long as such
618parties remain in full compliance.
619.PP
620
62110. FUTURE REVISIONS OF THIS LICENSE
622.PP
623The Free Software Foundation may publish new, revised versions
624of the GNU Free Documentation License from time to time. Such new
625versions will be similar in spirit to the present version, but may
626differ in detail to address new problems or concerns. See
627http://www.gnu.org/copyleft/.
628.PP
629Each version of the License is given a distinguishing version number.
630If the Document specifies that a particular numbered version of this
631License "or any later version" applies to it, you have the option of
632following the terms and conditions either of that specified version or
633of any later version that has been published (not as a draft) by the
634Free Software Foundation. If the Document does not specify a version
635number of this License, you may choose any version ever published (not
636as a draft) by the Free Software Foundation.
637.PP
638
639ADDENDUM: How to use this License for your documents
640.PP
641To use this License in a document you have written, include a copy of
642the License in the document and put the following copyright and
643license notices just after the title page:
644.PP
645 Copyright (c) YEAR YOUR NAME.
646 Permission is granted to copy, distribute and/or
647 modify this document under the terms of the GNU
648 Free Documentation License, Version 1.1 or any later
649 version published by the Free Software Foundation;
650 with the Invariant Sections being LIST THEIR TITLES,
651 with the Front-Cover Texts being LIST, and with the
652 Back-Cover Texts being LIST. A copy of the license
653 is included in the section entitled "GNU Free
654 Documentation License".
655.PP
656If you have no Invariant Sections, write "with no Invariant Sections"
657instead of saying which ones are invariant. If you have no
658Front-Cover Texts, write "no Front-Cover Texts" instead of
659"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
660.PP
661If your document contains nontrivial examples of program code, we
662recommend releasing these examples in parallel under your choice of
663free software license, such as the GNU General Public License,
664to permit their use in free software.
This page took 0.081613 seconds and 4 git commands to generate.