1 | README for GAS |
---|
2 | |
---|
3 | A number of things have changed since version 1 and the wonderful world of gas |
---|
4 | looks very different. There's still a lot of irrelevant garbage lying around |
---|
5 | that will be cleaned up in time. Documentation is scarce, as are logs of the |
---|
6 | changes made since the last gas release. My apologies, and I'll try to get |
---|
7 | something useful. |
---|
8 | |
---|
9 | Unpacking and Installation - Summary |
---|
10 | ==================================== |
---|
11 | |
---|
12 | See ../binutils/README. |
---|
13 | |
---|
14 | To build just the assembler, make the target all-gas. |
---|
15 | |
---|
16 | Documentation |
---|
17 | ============= |
---|
18 | |
---|
19 | The GAS release includes texinfo source for its manual, which can be processed |
---|
20 | into `info' or `dvi' forms. |
---|
21 | |
---|
22 | The DVI form is suitable for printing or displaying; the commands for doing |
---|
23 | this vary from system to system. On many systems, `lpr -d' will print a DVI |
---|
24 | file. On others, you may need to run a program such as `dvips' to convert the |
---|
25 | DVI file into a form your system can print. |
---|
26 | |
---|
27 | If you wish to build the DVI file, you will need to have TeX installed on your |
---|
28 | system. You can rebuild it by typing: |
---|
29 | |
---|
30 | cd gas/doc |
---|
31 | make as.dvi |
---|
32 | |
---|
33 | The Info form is viewable with the GNU Emacs `info' subsystem, or the |
---|
34 | standalone `info' program, available as part of the GNU Texinfo distribution. |
---|
35 | To build the info files, you will need the `makeinfo' program. Type: |
---|
36 | |
---|
37 | cd gas/doc |
---|
38 | make info |
---|
39 | |
---|
40 | Specifying names for hosts and targets |
---|
41 | ====================================== |
---|
42 | |
---|
43 | The specifications used for hosts and targets in the `configure' |
---|
44 | script are based on a three-part naming scheme, but some short |
---|
45 | predefined aliases are also supported. The full naming scheme encodes |
---|
46 | three pieces of information in the following pattern: |
---|
47 | |
---|
48 | ARCHITECTURE-VENDOR-OS |
---|
49 | |
---|
50 | For example, you can use the alias `sun4' as a HOST argument or in a |
---|
51 | `--target=TARGET' option. The equivalent full name is |
---|
52 | `sparc-sun-sunos4'. |
---|
53 | |
---|
54 | The `configure' script accompanying GAS does not provide any query |
---|
55 | facility to list all supported host and target names or aliases. |
---|
56 | `configure' calls the Bourne shell script `config.sub' to map |
---|
57 | abbreviations to full names; you can read the script, if you wish, or |
---|
58 | you can use it to test your guesses on abbreviations--for example: |
---|
59 | |
---|
60 | % sh config.sub sun4 |
---|
61 | sparc-sun-sunos411 |
---|
62 | % sh config.sub sun3 |
---|
63 | m68k-sun-sunos411 |
---|
64 | % sh config.sub decstation |
---|
65 | mips-dec-ultrix42 |
---|
66 | % sh config.sub hp300bsd |
---|
67 | m68k-hp-bsd |
---|
68 | % sh config.sub i386v |
---|
69 | i386-unknown-sysv |
---|
70 | % sh config.sub i786v |
---|
71 | Invalid configuration `i786v': machine `i786v' not recognized |
---|
72 | |
---|
73 | |
---|
74 | `configure' options |
---|
75 | =================== |
---|
76 | |
---|
77 | Here is a summary of the `configure' options and arguments that are |
---|
78 | most often useful for building GAS. `configure' also has several other |
---|
79 | options not listed here. |
---|
80 | |
---|
81 | configure [--help] |
---|
82 | [--prefix=DIR] |
---|
83 | [--srcdir=PATH] |
---|
84 | [--host=HOST] |
---|
85 | [--target=TARGET] |
---|
86 | [--with-OPTION] |
---|
87 | [--enable-OPTION] |
---|
88 | |
---|
89 | You may introduce options with a single `-' rather than `--' if you |
---|
90 | prefer; but you may abbreviate option names if you use `--'. |
---|
91 | |
---|
92 | `--help' |
---|
93 | Print a summary of the options to `configure', and exit. |
---|
94 | |
---|
95 | `-prefix=DIR' |
---|
96 | Configure the source to install programs and files under directory |
---|
97 | `DIR'. |
---|
98 | |
---|
99 | `--srcdir=PATH' |
---|
100 | Look for the package's source code in directory DIR. Usually |
---|
101 | `configure' can determine that directory automatically. |
---|
102 | |
---|
103 | `--host=HOST' |
---|
104 | Configure GAS to run on the specified HOST. Normally the |
---|
105 | configure script can figure this out automatically. |
---|
106 | |
---|
107 | There is no convenient way to generate a list of all available |
---|
108 | hosts. |
---|
109 | |
---|
110 | `--target=TARGET' |
---|
111 | Configure GAS for cross-assembling programs for the specified |
---|
112 | TARGET. Without this option, GAS is configured to assemble .o files |
---|
113 | that run on the same machine (HOST) as GAS itself. |
---|
114 | |
---|
115 | There is no convenient way to generate a list of all available |
---|
116 | targets. |
---|
117 | |
---|
118 | `--enable-OPTION' |
---|
119 | These flags tell the program or library being configured to |
---|
120 | configure itself differently from the default for the specified |
---|
121 | host/target combination. See below for a list of `--enable' |
---|
122 | options recognized in the gas distribution. |
---|
123 | |
---|
124 | `configure' accepts other options, for compatibility with configuring |
---|
125 | other GNU tools recursively; but these are the only options that affect |
---|
126 | GAS or its supporting libraries. |
---|
127 | |
---|
128 | The `--enable' options recognized by software in the gas distribution are: |
---|
129 | |
---|
130 | `--enable-targets=...' |
---|
131 | This causes one or more specified configurations to be added to those for |
---|
132 | which BFD support is compiled. Currently gas cannot use any format other |
---|
133 | than its compiled-in default, so this option is not very useful. |
---|
134 | |
---|
135 | `--enable-bfd-assembler' |
---|
136 | This causes the assembler to use the new code being merged into it to use |
---|
137 | BFD data structures internally, and use BFD for writing object files. |
---|
138 | For most targets, this isn't supported yet. For most targets where it has |
---|
139 | been done, it's already the default. So generally you won't need to use |
---|
140 | this option. |
---|
141 | |
---|
142 | Supported platforms |
---|
143 | =================== |
---|
144 | |
---|
145 | At this point I believe gas to be ansi only code for most target cpu's. That |
---|
146 | is, there should be relatively few, if any host system dependencies. So |
---|
147 | porting (as a cross-assembler) to hosts not yet supported should be fairly |
---|
148 | easy. Porting to a new target shouldn't be too tough if it's a variant of one |
---|
149 | already supported. |
---|
150 | |
---|
151 | Native assembling should work on: |
---|
152 | |
---|
153 | sun3 |
---|
154 | sun4 |
---|
155 | 386bsd |
---|
156 | bsd/386 |
---|
157 | delta (m68k-sysv from Motorola) |
---|
158 | delta88 (m88k-sysv from Motorola) |
---|
159 | GNU/linux |
---|
160 | m68k hpux 8.0 (hpux 7.0 may be a problem) |
---|
161 | vax bsd, ultrix, vms |
---|
162 | hp9000s300 |
---|
163 | decstation |
---|
164 | irix 4 |
---|
165 | irix 5 |
---|
166 | miniframe (m68k-sysv from Convergent Technologies) |
---|
167 | i386-aix (ps/2) |
---|
168 | hppa (hpux 4.3bsd, osf1) |
---|
169 | AIX |
---|
170 | unixware |
---|
171 | sco 3.2v4.2 |
---|
172 | sco openserver 5.0 (a.k.a. 3.2v5.0 ) |
---|
173 | sparc solaris |
---|
174 | ns32k (netbsd, lites) |
---|
175 | |
---|
176 | I believe that gas as a cross-assembler can currently be targetted for |
---|
177 | most of the above hosts, plus |
---|
178 | |
---|
179 | decstation-bsd (a.out format, to be used in BSD 4.4) |
---|
180 | ebmon29k |
---|
181 | go32 (DOS on i386, with DJGPP -- old a.out version) |
---|
182 | h8/300, h8/500 (Hitachi) |
---|
183 | i386-aix (ps/2) |
---|
184 | i960-coff |
---|
185 | mips ecoff (decstation-ultrix, iris, mips magnum, mips-idt-ecoff) |
---|
186 | Mitsubishi d10v and d30v |
---|
187 | nindy960 |
---|
188 | powerpc EABI |
---|
189 | SH (Hitachi) |
---|
190 | sco386 |
---|
191 | TI tic30 and tic80 |
---|
192 | vax bsd or ultrix? |
---|
193 | vms |
---|
194 | vxworks68k |
---|
195 | vxworks960 |
---|
196 | z8000 (Zilog) |
---|
197 | |
---|
198 | MIPS ECOFF support has been added, but GAS will not run a C-style |
---|
199 | preprocessor. If you want that, rename your file to have a ".S" suffix, and |
---|
200 | run gcc on it. Or run "gcc -xassembler-with-cpp foo.s". |
---|
201 | |
---|
202 | Support for ELF should work now for sparc, hppa, i386, alpha, m68k, |
---|
203 | MIPS, powerpc. |
---|
204 | |
---|
205 | Support for sequent (ns32k), tahoe, i860, m88k may be suffering from bitrot. |
---|
206 | |
---|
207 | If you try out gas on some host or target not listed above, please let me know |
---|
208 | the results, so I can update the list. |
---|
209 | |
---|
210 | Compiler Support Hacks |
---|
211 | ====================== |
---|
212 | |
---|
213 | On a few targets, the assembler has been modified to support a feature |
---|
214 | that is potentially useful when assembling compiler output, but which |
---|
215 | may confuse assembly language programmers. If assembler encounters a |
---|
216 | .word pseudo-op of the form symbol1-symbol2 (the difference of two |
---|
217 | symbols), and the difference of those two symbols will not fit in 16 |
---|
218 | bits, the assembler will create a branch around a long jump to |
---|
219 | symbol1, and insert this into the output directly before the next |
---|
220 | label: The .word will (instead of containing garbage, or giving an |
---|
221 | error message) contain (the address of the long jump)-symbol2. This |
---|
222 | allows the assembler to assemble jump tables that jump to locations |
---|
223 | very far away into code that works properly. If the next label is |
---|
224 | more than 32K away from the .word, you lose (silently); RMS claims |
---|
225 | this will never happen. If the -K option is given, you will get a |
---|
226 | warning message when this happens. |
---|
227 | |
---|
228 | |
---|
229 | REPORTING BUGS IN GAS |
---|
230 | ===================== |
---|
231 | |
---|
232 | Bugs in gas should be reported to bug-binutils@gnu.org. They may be |
---|
233 | cross-posted to bug-gcc if they affect the use of gas with gcc. They |
---|
234 | should not be reported just to bug-gcc, since I don't read that list, |
---|
235 | and therefore wouldn't see them. |
---|
236 | |
---|
237 | If you report a bug in GAS, please remember to include: |
---|
238 | |
---|
239 | A description of exactly what went wrong, and exactly what should have |
---|
240 | happened instead. |
---|
241 | |
---|
242 | The type of machine (VAX, 68020, etc) and operating system (BSD, SunOS, DYNIX, |
---|
243 | VMS, etc) GAS was running on. |
---|
244 | |
---|
245 | The configuration name(s) given to the "configure" script. The |
---|
246 | "config.status" file should have this information. |
---|
247 | |
---|
248 | The options given to GAS at run time. |
---|
249 | |
---|
250 | The actual input file that caused the problem. |
---|
251 | |
---|
252 | It is silly to report a bug in GAS without including an input file for GAS. |
---|
253 | Don't ask us to generate the file just because you made it from files you |
---|
254 | think we have access to. |
---|
255 | |
---|
256 | 1. You might be mistaken. |
---|
257 | 2. It might take us a lot of time to install things to regenerate that file. |
---|
258 | 3. We might get a different file from the one you got, and might not see any |
---|
259 | bug. |
---|
260 | |
---|
261 | To save us these delays and uncertainties, always send the input file for the |
---|
262 | program that failed. A smaller test case that demonstrates the problem is of |
---|
263 | course preferable, but be sure it is a complete input file, and that it really |
---|
264 | does demonstrate the problem; but if paring it down would cause large delays |
---|
265 | in filing the bug report, don't bother. |
---|
266 | |
---|
267 | If the input file is very large, and you are on the internet, you may want to |
---|
268 | make it avaliable for anonymous FTP instead of mailing it. If you do, include |
---|
269 | instructions for FTP'ing it in your bug report. |
---|
270 | |
---|
271 | If you expect to be contributing a large number of test cases, it would be |
---|
272 | helpful if you would look at the test suite included in the release (based on |
---|
273 | the Deja Gnu testing framework, available from the usual ftp sites) and write |
---|
274 | test cases to fit into that framework. This is certainly not required. |
---|