AS(1) General Commands Manual SourceForge Logo

NAME

asan assembler

SYNOPSIS

as [-D] [-I dir] [-J] [-K] [-L | --keep-locals] [-R] [-V] [-W | --no-warn] [-Z] [-a[cdghlns][=filename]] [-g | --gen-debug] [-h | --help] [-march=cpu[,+[extensions]...]] [-mtune=cpu] [-n] [-o obj] [-q] [--MD file] [--defsym symbol=value] [--fatal-warnings] [--listing-lhs-width] [--listing-lhs-width2] [--listing-rhs-width] [--listing-cont-lines] [--statistics] [--strip-local-absolute] [--target-help] [--version] [--warn] [target-options] [file ...]

DESCRIPTION

The as utility creates an ELF relocatable object from assembly language sources.
If multiple source files are specified, as will read each of them in the order specified. If no files are specified, as will read from standard input.
The as utility understands the following options:
 
 
-D
Display internal debugging messages.
 
 
-I dir
Add the directory named by argument dir to the search path used by the .include directive.
 
 
-J
Suppress warnings about overflows in signed arithmetic.
 
 
-K
Warn about alterations to difference tables if any.
 
 
-L | --keep-locals
Keep local symbols in the output file. The default is to discard local symbols.
 
 
-R
Merge the .data and .text sections when creating an object.
 
 
-V
Print the assembler version on standard output before assembling the inputs.
 
 
-W | --no-warn
Suppress assembler warnings.
 
 
-Z
Generate an output object even if there were errors in the input.
 
 
-a[cdghlns][=filename]
Control generated listings. The supported flags are:
c
Omit listing code in false conditional paths.
d
Omit debugging directives.
g
Include the version of the assembler and other general information in the generated listing.
h
Include high-level source in the listing.
l
Include assembly source in the listing.
m
Include macro expansions in the listing.
n
Suppress generation of the header and footer in the listing.
s
Include symbol information in the listing.
=filename
Set the name of the listing file to that specified by argument filename. If specified, this flag must be the last in the list.
If option -a is specified without additional arguments, a flag set of ‘hls’ is assumed.
 
 
-g | --gen-debug
Generate debug information in DWARF format.
 
 
-h | --help
Show a help message and exit.
 
 
-march=cpu[,+[extensions]...]
Generated code for the CPU named by argument cpu with additional instruction set extensions named by the argument extensions.
 
 
-mtune=cpu
Optimize the assembled object for the CPU named by the argument cpu.
 
 
-n
Do not optimize code alignment.
 
 
-o filename
Write the assembled output to the file named by argument filename.
 
 
-q
Suppress warnings.
 
 
--MD filename
Write dependency information in a form usable by make(1) to the file name by argument filename.
 
 
--defsym symbol=value
Define symbol named by the argument symbol as having the value named by value. The argument value is an integer in one of the forms accepted by atoi(3).
 
 
--fatal-warnings
Treat all warnings as fatal.
 
 
--listing-lhs-width=nwords
Set the width of the output data column in a listing to the number of machine words specified in argument nwords.
 
 
--listing-lhs-width2=nwords
Set the width of continuation lines for the data column to the number of machine words specified in argument nwords.
 
 
--listing-rhs-width=nchars
Set the maximum displayed width of an input source line to the number of characters specified by argument nchars.
 
 
--listing-cont-lines=nlines
Set the maximum number of listing lines generated by one input source line to nlines+1.
 
 
--statistics
Print statistics for the run at exit.
 
 
--strip-local-absolute
Remove local absolute symbols from the generated output.
 
 
--target-help
Display help for the target CPU.
 
 
--version
Print a version identifier and exit.
 
 
--warn
Print warnings.

EXIT STATUS

The as utility exits 0 on success, and >0 if an error occurs.

SEE ALSO

elfcopy(1), ld(1), nm(1), strings(1), strip(1), elf(5)
December 22, 2012 The Elftoolchain Project