You should use GNU as
to assemble GCC
output. To
ensure this, GCC
should be configured using the
`--with-gnu-as' switch (as it is in Cygnus distributions
). Alternatively, you can invoke GCC
with the -mgas
option.
If you invoke as
via the GNU C compiler (version 2), you can use
the `-Wa' option to pass arguments through to the assembler. One
common use of this option is to exploit the assembler's listing
features. Assembler arguments you specify with gcc -Wa
must be
separated from each other (and the `-Wa') by commas. For example,
the `-alh' assembler option in the following commandline:
$ hms-gcc -c -g -O -Wa,-alh,-L file.c
requests a listing with high-level language and assembly language interspersed.
The example also illustrates two other convenient options to specify for assembler listings:
These are the options to enable listing output from the assembler. By itself, `-a' requests listings of high-level language source, assembly language, and symbols.
You can use other letters to select specific options for the list: `-ah' requests a high-level language listing, `-al' requests an output-program assembly listing, and `-as' requests a symbol table listing. High-level listings require that a compiler debugging option like `-g' be used, and that assembly listings (`-al') be requested also.
You can use the `-ad' option to omit debugging directives from the listing.
When you specify one of these options, you can further control listing output and its appearance using these listing-control assembler directives:
.nolist
.list
.psize linecount , columnwidth
.eject
.title
.sbttl
If you do not request listing output with one of the `-a' options, these listing-control directives have no effect. You can also use the `-an' option to turn off all forms processing.
The letters after `-a' may be combined into one option, e.g., `-aln'.