2.6. as, the GNU Assembler
as, the GNU assembler, translates text-based assembly language source files into binary-based object files. Normally it operates without you being aware of it, as the compiler driver program (gcc) invokes it automatically. However, if you are creating your own assembler source files, you must invoke as directly.
If, while using gcc, you want to pass special command-line options to the assembler to control its behavior, you need to use the `-Wa,<text>' command-line option. This option passes <text> directly to the assembler's command line. For example:
Code:
# gcc -c -g -O -Wa,-alh,-L file.c
passes the -alh command line option on to the assembler. (This causes the assembler to emit a listing file that shows the assembler source generated by the compiler for each line of the C source file file.c).
For more information, refer to Using as, the Gnu Assembler.