Contents|Index|Previous|Next

Command-Line Options

The following documentation describes command-line options available in all versions of the GNU assembler; see also Machine Dependent Features for options specific to particular machine architectures.

- Enable Listings: -a[dhlns]
- -D
- Work Faster: -f
- .include search path: -I path
- Difference Tables: -K
- Include Local Labels: -L
- Assemble in MRI Compatibility Mode: -M
- Name the Object File: -o
- Join Data and Text Sections: -R
- Display Assembly Statistics: --statistics
- Announce Version: -v
- Suppress Warnings: -W
- Generate Object File in Spite of Errors: -Z

If you are invoking as using the GNU C compiler (version 2), you can use the -Wa option to pass arguments through to the assembler. The assembler arguments must be separated from each other (and the -Wa) by commas. Use the following for example.

gcc -c -g -O -Wa,-alh,-L file.c

This input emits a listing to standard output with high-level and assembly source.

Usually you do not need to use the -Wa mechanism, since many compiler command-line options are automatically passed to the assembler by the compiler. (You can call the GNU compiler driver with the -v option to see precisely what options it passes to each compilation pass, including the assembler.)