Manual page for AS(1)
as - Sun-1, Sun-2 and Sun-3, Sun-4 and Sun386i assemblers
SUN-1, SUN-2 and SUN-3 SYNOPSIS
as
[
-L
] [
-R
] [
-o objfile
] [
-d2
]
[
-h
] [
-j
] [
-J
] [
-O
]
[
-mc68010
]
[
-mc68020
]
filename
SUN-4 SYNOPSIS
as
[
-L
] [
-R
] [
-o objfile
] [
-O[n]]
[
-P
[[
-Ipath
] [
-Dname
] [
-Dname=def
]
[
-Uname
]]...]
[
-S[C]]
filename
...
Sun386i SYNOPSIS
as
[
-k
]
[
-o
objfile
]
[
-R
]
[
-V
]
[
-i386
]
DESCRIPTION
as
translates the assembly source file,
filename
into an executable object file,
objfile.
The Sun-4 assembler recognizes the filename argument
`-'
as the standard input.
All undefined symbols in the assembly are treated as global.
The output of the assembly is left in the file
objfile.
OPTIONS
The following options are common to all Sun architectures. Options
for specific Sun architectures are listed below.
- -L
-
Save defined labels beginning with an
L,
which are normally discarded
to save space in the resultant symbol table.
The compilers generate many such temporary labels.
- -R
-
Make the initialized data segment read-only by concatenating
it to the text segment.
This eliminates the need to run editor scripts on assembly
code to make initialized data read-only and shared.
- -o objfile
-
The next argument is taken as the name of the object file to
be produced. If the
-o
flag is not used, the object file is named
a.out.
Sun-1, Sun-2 and Sun-3 Options
- -d2
-
Instruction offsets that involve forward or external
references, and with unspecified size, are two bytes long.
(See also the
-j
option.)
- -h
-
Suppress span-dependent instruction calculations. Restrict branches
to medium length. Force calls to take the most general form.
This option is used when the assembly must be minimized, even at
the expense of program size and run-time performance. It
results in a smaller and faster program than one produced by the
-J
option, but some very large programs may be unable to use it due
to the limits of medium-length branches.
- -j
-
Use short (pc-relative) branches to resolve jump and jump-to-subroutine
instructions to external routines. This is for compact programs for
which the
-d2
option is inappropriate due to large-program relocation.
- -J
-
Suppress span-dependent instruction calculations and force branches
and calls to take the most general form. This is useful when assembly
time must be minimized, even at the expense of program size and
run-time performance.
- -O
-
Perform span-dependent instruction resolution over entire files
rather than just individual procedures.
Sun-4 Options
- -O[n]
-
Enable peephole optimization corresponding to optimization level
n
(1 if
n
not specified)
of the Sun high-level language compilers.
This option can be used safely only when assembling code produced
by a Sun compiler.
- -P
-
Run
cpp.1
the C preprocessor, on the files being assembled.
The preprocessor is run separately on each input file,
not on their concatenation.
The preprocessor output is passed to the assembler.
- -Ipath
-
- -Dname
-
- -Dname=def
-
- -Uname
-
When
-P
is in effect, these
cpp.1
options are passed to the C
preprocessor, without interpretation by
as.
Otherwise, they are ignored.
- -S[C]
-
Produce a disassembly of the emitted code to the standard output.
This is most useful in combination with the
-O
option, to review optimized code. Adding the character C
to the option prevents comment lines from appearing in the output.
Sun386i Options
- -k
-
Create position independent code. Called by
cc -pic.
- -V
-
Write the version number of the assembler being run
on the standard error output.
- -i386
-
Confirm that this output is intended for an 80386 processor.
FILES
- /tmp/as*
-
default temporary file
SEE ALSO
adb.1
cpp.1
dbx.1
ld.1
a.out.5
coff.5
[a manual with the abbreviation 4ASSY]
[a manual with the abbreviation ASSY]
BUGS
The Sun Pascal compiler qualifies a nested procedure name by
chaining the names of the enclosing procedures.
This sometimes results in
names long enough to abort the assembler, which
currently limits identifiers to 512 characters
(the Sun-4 assembler does not have this restriction).
Sun386i WARNINGS
There can be only one forward-reference to a symbol per arithmetic
expression.
Created by unroff & hp-tools.
© somebody (See intro for details). All Rights Reserved.
Last modified 11/5/97