Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
as(1)				 User Commands				 as(1)

NAME
       as - assembler

SYNOPSIS
   Sparc
       as   [-b]  [  -K	  PIC]	[-L]  [-m]  [-n]  [-o outfile]	[-P]  [-Dname]
       [-Dname=def] [-Ipath] [-Uname...] [-q] [-Qy | n]	 [-s] [	-S [a |	b |  c
       | l | A | B | C | L] ] [-T] [-V]	[-xarch=v7  |  -xarch=v8  | -xarch=v8a
       | -xarch=v8plus	| -xarch=v8plusa  | -xarch=v9  | -xarch=v9a  ]	 [-xF]
       filename...

   IA
       as   [-b]  [  -K	  PIC]	[-L]  [-m]  [-n]  [-o outfile]	[-P]  [-Dname]
       [-Dname=def] [-Ipath] [-Uname...] [-Qy |	n]  [-s] [ -S [a | b | c | l |
       A | B | C | L] ]	[-T] [-V] filename...

DESCRIPTION
       The  as	command	 creates  object  files	 from assembly language	source
       files.

OPTIONS
   Common Options
       The following flags are common to both SPARC and	IA. They may be	speci-
       fied in any order:

       -b    Generates	extra  symbol  table  information  for the Sun Source-
	     Browser.

       -K PIC
	     Generates position-independent code.

       -L    Saves all symbols,	including temporary labels that	 are  normally
	     discarded	to save	space, in the ELF symbol table.

       -m    Runs the  m4(1) macro processor on	the input to the assembler.

       -n    Suppresses	all the	warnings while assembling.

       -o outfile
	     Puts  the output of the assembly in outfile. By default, the out-
	     put file name is formed by	removing the  .s suffix, if  there  is
	     one, from the input file name and appending a  .o suffix.

       -P    Runs   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 as-
	     sembler.

       -Dname

       -Dname=def
	     When the -P option	is in effect, these options are	passed to  the
	     cpp(1)  preprocessor  without  interpretation  by the as command;
	     otherwise,	they are ignored.

       -Ipath
	     When the -P option	is in effect, this option  is  passed  to  the
	     cpp(1)  preprocessor  without  interpretation  by the as command;
	     otherwise,	it is ignored.

       -Uname
	     When the -P option	is in effect,  this option is  passed  to  the
	     cpp(1)  preprocessor  without  interpretation  by the as command;
	     otherwise,	it is ignored.

       -Qy | n
	     If	y is specified,	this option produces the  "assembler  version"
	     information  in the comment section of the	output object file. If
	     n is specified, the information is	suppressed.

       -s    Places all	stabs in the .stabs section.  By  default,  stabs  are
	     placed  in	 stabs.excl  sections,	which  are stripped out	by the
	     static linker, ld(1), during final	execution. When	the -s	option
	     is	 used, stabs remain in the final executable because .stab sec-
	     tions are not stripped by the static  linker.

       -S[a|b|c|l|A|B| C|L]
	     Produces a	disassembly of the emitted code	to the	standard  out-
	     put.   Adding  each  of the following characters to the -S	option
	     produces:

	      a	    disassembling with address

	      b	    disassembling with ".bof"

	      c	    disassembling with comments

	      l	    disassembling with line numbers

	      Capital letters turn the switch off for  the  corresponding  op-
	      tion.

       -T    This is a migration option	for 4.x	assembly files to be assembled
	     on	5.x systems. With this option, the symbol names	in 4.x	assem-
	     bly files will be interpreted as 5.x symbol names.

       -V    Writes the	version	number of the assembler	being run on the stan-
	     dard error	output.

       -xF   Generates additional information for performance analysis of  the
	     executable	 using	Sun  WorkShop analyzer.	If the input file does
	     not contain any stabs (debugging directives), then	the  assembler
	     will  generate  some  default  stabs  which are needed by the Sun
	     WorkShop analyzer.	Also see the dbx manual	 page  available  with
	     Sun Workshop.

   Options for SPARC only
       -q    Performs  a quick assembly.  When the -q option is	used, many er-
	     ror checks	are not	performed. Note: This option disables many er-
	     ror  checks.  Use of this option to assemble handwritten assembly
	     language is not recommended.

       -xarch=v7
	     This option instructs the assembler to  accept  instructions  de-
	     fined   in	 the  SPARC version 7 (V7) architecture. The resulting
	     object code is in ELF format.

       -xarch=v8
	     This option instructs the assembler to  accept  instructions  de-
	     fined  in	the  SPARC-V8  architecture,  less  the	quad-precision
	     floating-point instructions. The resulting	object code is in  ELF
	     format.

       -xarch=v8a
	     This  option  instructs  the assembler to accept instructions de-
	     fined in the  SPARC-V8  architecture,   less  the	quad-precision
	     floating-point instructions and less the  fsmuld instruction. The
	     resulting object code is in  ELF  format.	This  is  the  default
	     choice of the -xarch=options.

       -xarch=v8plus
	     This  option  instructs  the assembler to accept instructions de-
	     fined in  the  SPARC-V9  architecture,  less  the	quad-precision
	     floating-point  instructions. The resulting object	code is	in ELF
	     format. It	will not execute on a Solaris  V8  system  (a  machine
	     with  a  V8  processor). It will execute on a Solaris V8+ system.
	     This combination is a SPARC 64-bit	processor and a	32-bit OS.

       -xarch=v8plusa
	     This option instructs the assembler to  accept  instructions  de-
	     fined  in	the  SPARC-V9  architecture,  less  the	quad-precision
	     floating-point instructions, plus the instructions	in the	Visual
	     Instruction  Set  (VIS).  The resulting object code is in V8+ ELF
	     format. It	will not execute on a Solaris  V8  system  (a  machine
	     with a  V8	processor). It will execute on a Solaris V8+ system

       -xarch=v9
	     This  option limits the instruction set to	the SPARC-V9 architec-
	     ture. The resulting .o object files are in	64-bit ELF format  and
	     can  only	be  linked with	other object files in the same format.
	     The resulting executable can only be run on a 64-bit  SPARC  pro-
	     cessor running 64-bit Solaris with	the 64-bit kernel.

       -xarch=v9a
	     This  option limits the instruction set to	the SPARC-V9 architec-
	     ture, adding the Visual Instruction Set (VIS) and extensions spe-
	     cific to UltraSPARC processors. The resulting .o object files are
	     in	64-bit ELF format and can only be  linked  with	 other	object
	     files  in	the  same format. The resulting	executable can only be
	     run on a 64-bit SPARC processor running 64-bit Solaris  with  the
	     64-bit kernel.

OPERANDS
       The following operand is	supported:

       filename
	     Assembly language source file

ENVIRONMENT VARIABLES
       TMPDIR
	     The  as command normally creates temporary	files in the directory
	     /tmp. Another directory may be specified by setting the  environ-
	     ment  variable   TMPDIR to	the chosen directory.	(If  TMPDIR is
	     not a valid directory, then as will use /tmp).

FILES
       By default, as creates its temporary files in /tmp.

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       +-----------------------------+-----------------------------+
       |      ATTRIBUTE	TYPE	     |	    ATTRIBUTE VALUE	   |
       +-----------------------------+-----------------------------+
       |Availability		     |SUNWsprot			   |
       +-----------------------------+-----------------------------+

SEE ALSO
       cc(1B), cpp(1),ld(1), m4(1), nm(1), strip(1), tmpnam(3C), a.out(4), at-
       tributes(5)

       dbx manual page available with Sun Workshop

NOTES
       If  the	-m  option,  which invokes the m4(1) macro processor, is used,
       keywords	for m4 cannot be used as symbols  (variables,  functions,  la-
       bels)  in  the input file, since	m4 cannot determine which keywords are
       assembler symbols and  which keywords are real m4 macros.

       Whenever	possible, access the assembler through	a  compilation	system
       interface program such as  cc(1B).

       All undefined symbols are treated as global.

SunOS 5.9			  12 Jan 2001				 as(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | ENVIRONMENT VARIABLES | FILES | ATTRIBUTES | SEE ALSO | NOTES

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=as&sektion=1&manpath=SunOS+5.9>

home | help