1 1.1 christos README for GAS 2 1.1 christos 3 1.1 christos A number of things have changed since version 1 and the wonderful 4 1.1 christos world of gas looks very different. There's still a lot of irrelevant 5 1.1 christos garbage lying around that will be cleaned up in time. Documentation 6 1.1 christos is scarce, as are logs of the changes made since the last gas release. 7 1.1 christos My apologies, and I'll try to get something useful. 8 1.1 christos 9 1.1 christos Unpacking and Installation - Summary 10 1.1 christos ==================================== 11 1.1 christos 12 1.1 christos See ../binutils/README. 13 1.1 christos 14 1.1 christos To build just the assembler, make the target all-gas. 15 1.1 christos 16 1.1 christos Documentation 17 1.1 christos ============= 18 1.1 christos 19 1.1 christos The GAS release includes texinfo source for its manual, which can be processed 20 1.1 christos into `info' or `dvi' forms. 21 1.1 christos 22 1.1 christos The DVI form is suitable for printing or displaying; the commands for doing 23 1.1 christos this vary from system to system. On many systems, `lpr -d' will print a DVI 24 1.1 christos file. On others, you may need to run a program such as `dvips' to convert the 25 1.1 christos DVI file into a form your system can print. 26 1.1 christos 27 1.1 christos If you wish to build the DVI file, you will need to have TeX installed on your 28 1.1 christos system. You can rebuild it by typing: 29 1.1 christos 30 1.1 christos cd gas/doc 31 1.1 christos make as.dvi 32 1.1 christos 33 1.1 christos The Info form is viewable with the GNU Emacs `info' subsystem, or the 34 1.1 christos stand-alone `info' program, available as part of the GNU Texinfo distribution. 35 1.1 christos To build the info files, you will need the `makeinfo' program. Type: 36 1.1 christos 37 1.1 christos cd gas/doc 38 1.1 christos make info 39 1.1 christos 40 1.1 christos Specifying names for hosts and targets 41 1.1 christos ====================================== 42 1.1 christos 43 1.1 christos The specifications used for hosts and targets in the `configure' 44 1.1 christos script are based on a three-part naming scheme, but some short 45 1.1 christos predefined aliases are also supported. The full naming scheme encodes 46 1.1 christos three pieces of information in the following pattern: 47 1.1 christos 48 1.1 christos ARCHITECTURE-VENDOR-OS 49 1.1 christos 50 1.1 christos For example, you can use the alias `sun4' as a HOST argument or in a 51 1.1 christos `--target=TARGET' option. The equivalent full name is 52 1.1 christos `sparc-sun-sunos4'. 53 1.1 christos 54 1.1 christos The `configure' script accompanying GAS does not provide any query 55 1.3 christos facility to list all supported host and target names or aliases. 56 1.1 christos `configure' calls the Bourne shell script `config.sub' to map 57 1.1 christos abbreviations to full names; you can read the script, if you wish, or 58 1.1 christos you can use it to test your guesses on abbreviations--for example: 59 1.1 christos 60 1.1 christos % sh config.sub i386v 61 1.1 christos i386-unknown-sysv 62 1.1 christos % sh config.sub i786v 63 1.1 christos Invalid configuration `i786v': machine `i786v' not recognized 64 1.1 christos 65 1.1 christos 66 1.1 christos `configure' options 67 1.1 christos =================== 68 1.1 christos 69 1.1 christos Here is a summary of the `configure' options and arguments that are 70 1.1 christos most often useful for building GAS. `configure' also has several other 71 1.1 christos options not listed here. 72 1.1 christos 73 1.1 christos configure [--help] 74 1.1 christos [--prefix=DIR] 75 1.1 christos [--srcdir=PATH] 76 1.1 christos [--host=HOST] 77 1.1 christos [--target=TARGET] 78 1.1 christos [--with-OPTION] 79 1.1 christos [--enable-OPTION] 80 1.1 christos 81 1.1 christos You may introduce options with a single `-' rather than `--' if you 82 1.1 christos prefer; but you may abbreviate option names if you use `--'. 83 1.1 christos 84 1.1 christos `--help' 85 1.1 christos Print a summary of the options to `configure', and exit. 86 1.1 christos 87 1.1 christos `-prefix=DIR' 88 1.1 christos Configure the source to install programs and files under directory 89 1.1 christos `DIR'. 90 1.1 christos 91 1.1 christos `--srcdir=PATH' 92 1.1 christos Look for the package's source code in directory DIR. Usually 93 1.1 christos `configure' can determine that directory automatically. 94 1.1 christos 95 1.1 christos `--host=HOST' 96 1.1 christos Configure GAS to run on the specified HOST. Normally the 97 1.1 christos configure script can figure this out automatically. 98 1.1 christos 99 1.1 christos There is no convenient way to generate a list of all available 100 1.1 christos hosts. 101 1.1 christos 102 1.1 christos `--target=TARGET' 103 1.1 christos Configure GAS for cross-assembling programs for the specified 104 1.1 christos TARGET. Without this option, GAS is configured to assemble .o files 105 1.1 christos that run on the same machine (HOST) as GAS itself. 106 1.1 christos 107 1.1 christos There is no convenient way to generate a list of all available 108 1.1 christos targets. 109 1.1 christos 110 1.1 christos `--enable-OPTION' 111 1.3 christos These flags tell the program or library being configured to 112 1.1 christos configure itself differently from the default for the specified 113 1.1 christos host/target combination. See below for a list of `--enable' 114 1.1 christos options recognized in the gas distribution. 115 1.1 christos 116 1.1 christos `configure' accepts other options, for compatibility with configuring 117 1.1 christos other GNU tools recursively; but these are the only options that affect 118 1.1 christos GAS or its supporting libraries. 119 1.1 christos 120 1.1 christos The `--enable' options recognized by software in the gas distribution are: 121 1.1 christos 122 1.1 christos `--enable-targets=...' 123 1.1 christos This causes one or more specified configurations to be added to those for 124 1.1 christos which BFD support is compiled. Currently gas cannot use any format other 125 1.1 christos than its compiled-in default, so this option is not very useful. 126 1.1 christos 127 1.1 christos `--enable-bfd-assembler' 128 1.1 christos This causes the assembler to use the new code being merged into it to use 129 1.1 christos BFD data structures internally, and use BFD for writing object files. 130 1.1 christos For most targets, this isn't supported yet. For most targets where it has 131 1.1 christos been done, it's already the default. So generally you won't need to use 132 1.1 christos this option. 133 1.1 christos 134 1.1 christos Compiler Support Hacks 135 1.1 christos ====================== 136 1.1 christos 137 1.1 christos On a few targets, the assembler has been modified to support a feature 138 1.1 christos that is potentially useful when assembling compiler output, but which 139 1.1 christos may confuse assembly language programmers. If assembler encounters a 140 1.1 christos .word pseudo-op of the form symbol1-symbol2 (the difference of two 141 1.1 christos symbols), and the difference of those two symbols will not fit in 16 142 1.1 christos bits, the assembler will create a branch around a long jump to 143 1.1 christos symbol1, and insert this into the output directly before the next 144 1.1 christos label: The .word will (instead of containing garbage, or giving an 145 1.1 christos error message) contain (the address of the long jump)-symbol2. This 146 1.1 christos allows the assembler to assemble jump tables that jump to locations 147 1.1 christos very far away into code that works properly. If the next label is 148 1.1 christos more than 32K away from the .word, you lose (silently); RMS claims 149 1.1 christos this will never happen. If the -K option is given, you will get a 150 1.1 christos warning message when this happens. 151 1.1 christos 152 1.1 christos 153 1.1 christos REPORTING BUGS IN GAS 154 1.1 christos ===================== 155 1.1 christos 156 1.1 christos Bugs in gas should be reported to: 157 1.1 christos 158 1.8 christos https://sourceware.org/bugzilla/ 159 1.1 christos 160 1.1 christos See ../binutils/README for what we need in a bug report. 161 1.3 christos 163 1.3 christos Copyright (C) 2012-2025 Free Software Foundation, Inc. 164 1.3 christos 165 1.3 christos Copying and distribution of this file, with or without modification, 166 1.3 christos are permitted in any medium without royalty provided the copyright 167 notice and this notice are preserved. 168