source: trunk/src/binutils/gas/doc/as.info-3@ 1109

Last change on this file since 1109 was 610, checked in by bird, 22 years ago

This commit was generated by cvs2svn to compensate for changes in r609,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 49.1 KB
Line 
1This is as.info, produced by makeinfo version 4.3 from as.texinfo.
2
3START-INFO-DIR-ENTRY
4* As: (as). The GNU assembler.
5* Gas: (as). The GNU assembler.
6END-INFO-DIR-ENTRY
7
8 This file documents the GNU Assembler "as".
9
10 Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002
11Free Software Foundation, Inc.
12
13 Permission is granted to copy, distribute and/or modify this document
14under the terms of the GNU Free Documentation License, Version 1.1 or
15any later version published by the Free Software Foundation; with no
16Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
17Texts. A copy of the license is included in the section entitled "GNU
18Free Documentation License".
19
20
21File: as.info, Node: Balign, Next: Byte, Prev: Asciz, Up: Pseudo Ops
22
23`.balign[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR'
24==========================================
25
26 Pad the location counter (in the current subsection) to a particular
27storage boundary. The first expression (which must be absolute) is the
28alignment request in bytes. For example `.balign 8' advances the
29location counter until it is a multiple of 8. If the location counter
30is already a multiple of 8, no change is needed.
31
32 The second expression (also absolute) gives the fill value to be
33stored in the padding bytes. It (and the comma) may be omitted. If it
34is omitted, the padding bytes are normally zero. However, on some
35systems, if the section is marked as containing code and the fill value
36is omitted, the space is filled with no-op instructions.
37
38 The third expression is also absolute, and is also optional. If it
39is present, it is the maximum number of bytes that should be skipped by
40this alignment directive. If doing the alignment would require
41skipping more bytes than the specified maximum, then the alignment is
42not done at all. You can omit the fill value (the second argument)
43entirely by simply using two commas after the required alignment; this
44can be useful if you want the alignment to be filled with no-op
45instructions when appropriate.
46
47 The `.balignw' and `.balignl' directives are variants of the
48`.balign' directive. The `.balignw' directive treats the fill pattern
49as a two byte word value. The `.balignl' directives treats the fill
50pattern as a four byte longword value. For example, `.balignw
514,0x368d' will align to a multiple of 4. If it skips two bytes, they
52will be filled in with the value 0x368d (the exact placement of the
53bytes depends upon the endianness of the processor). If it skips 1 or
543 bytes, the fill value is undefined.
55
56
57File: as.info, Node: Byte, Next: Comm, Prev: Balign, Up: Pseudo Ops
58
59`.byte EXPRESSIONS'
60===================
61
62 `.byte' expects zero or more expressions, separated by commas. Each
63expression is assembled into the next byte.
64
65
66File: as.info, Node: Comm, Next: Data, Prev: Byte, Up: Pseudo Ops
67
68`.comm SYMBOL , LENGTH '
69========================
70
71 `.comm' declares a common symbol named SYMBOL. When linking, a
72common symbol in one object file may be merged with a defined or common
73symbol of the same name in another object file. If `ld' does not see a
74definition for the symbol-just one or more common symbols-then it will
75allocate LENGTH bytes of uninitialized memory. LENGTH must be an
76absolute expression. If `ld' sees multiple common symbols with the
77same name, and they do not all have the same size, it will allocate
78space using the largest size.
79
80 When using ELF, the `.comm' directive takes an optional third
81argument. This is the desired alignment of the symbol, specified as a
82byte boundary (for example, an alignment of 16 means that the least
83significant 4 bits of the address should be zero). The alignment must
84be an absolute expression, and it must be a power of two. If `ld'
85allocates uninitialized memory for the common symbol, it will use the
86alignment when placing the symbol. If no alignment is specified, `as'
87will set the alignment to the largest power of two less than or equal
88to the size of the symbol, up to a maximum of 16.
89
90 The syntax for `.comm' differs slightly on the HPPA. The syntax is
91`SYMBOL .comm, LENGTH'; SYMBOL is optional.
92
93
94File: as.info, Node: Data, Next: Def, Prev: Comm, Up: Pseudo Ops
95
96`.data SUBSECTION'
97==================
98
99 `.data' tells `as' to assemble the following statements onto the end
100of the data subsection numbered SUBSECTION (which is an absolute
101expression). If SUBSECTION is omitted, it defaults to zero.
102
103
104File: as.info, Node: Def, Next: Desc, Prev: Data, Up: Pseudo Ops
105
106`.def NAME'
107===========
108
109 Begin defining debugging information for a symbol NAME; the
110definition extends until the `.endef' directive is encountered.
111
112 This directive is only observed when `as' is configured for COFF
113format output; when producing `b.out', `.def' is recognized, but
114ignored.
115
116
117File: as.info, Node: Desc, Next: Dim, Prev: Def, Up: Pseudo Ops
118
119`.desc SYMBOL, ABS-EXPRESSION'
120==============================
121
122 This directive sets the descriptor of the symbol (*note Symbol
123Attributes::) to the low 16 bits of an absolute expression.
124
125 The `.desc' directive is not available when `as' is configured for
126COFF output; it is only for `a.out' or `b.out' object format. For the
127sake of compatibility, `as' accepts it, but produces no output, when
128configured for COFF.
129
130
131File: as.info, Node: Dim, Next: Double, Prev: Desc, Up: Pseudo Ops
132
133`.dim'
134======
135
136 This directive is generated by compilers to include auxiliary
137debugging information in the symbol table. It is only permitted inside
138`.def'/`.endef' pairs.
139
140 `.dim' is only meaningful when generating COFF format output; when
141`as' is generating `b.out', it accepts this directive but ignores it.
142
143
144File: as.info, Node: Double, Next: Eject, Prev: Dim, Up: Pseudo Ops
145