www.delorie.com/gnu/docs/binutils/as_9.html   search  
Buy GNU books!

Using as

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. Command-Line Options

This chapter describes command-line options available in all versions of the GNU assembler; see section 8. Machine Dependent Features, for options specific to particular machine architectures.

If you are invoking as via 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. For example:

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

This passes two options to the assembler: `-alh' (emit a listing to standard output with high-level and assembly source) and `-L' (retain local symbols in the symbol table).

Usually you do not need to use this `-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.)

2.1 Enable Listings: `-a[cdhlns]'  -a[cdhlns] enable listings
2.2 `-D'  -D for compatibility
2.3 Work Faster: `-f'  -f to work faster
2.4 .include search path: `-I' path  -I for .include search path
2.5 Difference Tables: `-K'  -K for difference tables

2.6 Include Local Labels: `-L'  -L to retain local labels
2.7 Configuring listing output: `--listing'  --listing-XXX to configure listing output
2.8 Assemble in MRI Compatibility Mode: `-M'  -M or --mri to assemble in MRI compatibility mode
2.9 Dependency tracking: `--MD'  --MD for dependency tracking
2.10 Name the Object File: `-o'  -o to name the object file
2.11 Join Data and Text Sections: `-R'  -R to join data and text sections
2.12 Display Assembly Statistics: `--statistics'  --statistics to see statistics about assembly
2.13 Compatible output: `--traditional-format'  --traditional-format for compatible output
2.14 Announce Version: `-v'  -v to announce version
2.15 Control Warnings: `-W', `--warn', `--no-warn', `--fatal-warnings'  -W, --no-warn, --warn, --fatal-warnings to control warnings
2.16 Generate Object File in Spite of Errors: `-Z'  -Z to make object file even after errors

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003