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

FreeBSD Manual Pages

  
 
  

home | help
as(1)                 GNU Development Tools                 as(1)

NAME
       GNU as - the portable GNU assembler.

SYNOPSIS
       as [-a[dhlns][=file]] [-D] [--defsym SYM=VAL] [-f]
       [--gstabs] [-I path] [-K] [-L] [-M | --mri] [-o objfile]
       [-R] [--traditional-format] [-v] [-w] [-- | files...]

       i960-only options:
       [-ACA|-ACA_A|-ACB|-ACC|-AKA|-AKB|-AKC|-AMC] [-b]
       [-no-relax]

       m680x0-only options:
       [-l] [-mc68000|-mc68010|-mc68020]

DESCRIPTION
       GNU as is really a family of assemblers.  If you  use  (or
       have  used)  the  GNU  assembler  on one architecture, you
       should find a fairly similar environment when you  use  it
       on  another architecture.  Each version has much in common
       with the  others,  including  object  file  formats,  most
       assembler  directives (often called pseudo-ops) and assem-
       bler syntax.

       For information on the syntax and pseudo-ops used  by  GNU
       as,  see  `as'  entry in info (or the manual Using as: The
       GNU Assembler).

       as is primarily intended to assemble the output of the GNU
       C  compiler  gcc  for use by the linker ld.  Nevertheless,
       we've tried to make as assemble correctly everything  that
       the  native  assembler would.  This doesn't mean as always
       uses the same syntax as another  assembler  for  the  same
       architecture; for example, we know of several incompatible
       versions of 680x0 assembly language syntax.

       Each time you run as it assembles exactly one source  pro-
       gram.  The source program is made up of one or more files.
       (The standard input is also a file.)

       If as is given no file names it attempts to read one input
       file  from  the  as standard input, which is normally your
       terminal.  You may have to type ctl-D to tell as there  is
       no  more  program  to  assemble.   Use `--' if you need to
       explicitly name the standard input file  in  your  command
       line.

       as  may  write warnings and error messages to the standard
       error file (usually your terminal).  This should not  hap-
       pen  when as is run automatically by a compiler.  Warnings
       report an assumption made so that as could keep assembling
       a flawed program; errors report a grave problem that stops

Free Software Foundation  29 March 1996                         1

as(1)                 GNU Development Tools                 as(1)

       the assembly.

OPTIONS
       -a     Turn on assembly listings.  There are various  sub-
              options.  d omits debugging directives.  h includes
              the high level source code; this is only  available
              if  the  source file can be found, and the code was
              compiled with -g.  l includes an assembly  listing.
              n  omits  forms  processing.   s  includes a symbol
              listing.  = file sets the listing file  name;  this
              must be the last suboption.  The default suboptions
              are hls.

       -D     This option is accepted only for script compatibil-
              ity  with  calls  to  other  assemblers;  it has no
              effect on as.

       --defsym SYM=VALUE
              Define the symbol SYM to be VALUE before assembling
              the input file.  VALUE must be an integer constant.
              As in C,  a  leading  0x  indicates  a  hexadecimal
              value, and a leading 0 indicates an octal value.

       -f     ``fast''--skip preprocessing (assume source is com-
              piler output).

       -I path
              Add path to the search  list  for  .include  direc-
              tives.

       --gstabs
              Generate   stabs  debugging  information  for  each
              assembler line.  This may help debugging  assembler
              code, if the debugger can handle it.

       -K     Issue  warnings  when difference tables altered for
              long displacements.

       -L     Keep (in symbol table) local symbols, starting with
              `L'

       -M, --mri
              Assemble in MRI compatibility mode.

       -o objfile
              Name the object-file output from as

       -R     Fold data section into text section

       --traditional-format
              Use same format as native assembler, when possible.

       -v     Announce as version

Free Software Foundation  29 March 1996                         2

as(1)                 GNU Development Tools                 as(1)

       -W, --no-warn
              Suppress warning messages.

       --fatal-warnings
              Consider warnings to be fatal.

       --warn Just warn on warnings.

       -- | files...
              Source files to assemble, or standard input (--)

       -Avar  (When configured for  Intel  960.)   Specify  which
              variant of the 960 architecture is the target.

       -b     (When  configured for Intel 960.)  Add code to col-
              lect statistics about branches taken.

       -no-relax
              (When configured for Intel 960.)  Do not alter com-
              pare-and-branch  instructions  for  long  displace-
              ments; error if necessary.

       -l     (When configured for Motorola 68000).
              Shorten references to  undefined  symbols,  to  one
              word instead of two.

       -mc68000|-mc68010|-mc68020
              (When configured for Motorola 68000).
              Specify  what  processor in the 68000 family is the
              target (default 68020)

       Options may be in any order, and may be before, after,  or
       between  file  names.  The order of file names is signifi-
       cant.

       `--' (two hyphens) by itself names the standard input file
       explicitly, as one of the files for as to assemble.

       Except for `--' any command line argument that begins with
       a hyphen (`-') is an  option.   Each  option  changes  the
       behavior  of as.  No option changes the way another option
       works.  An option is a `-' followed by one  or  more  let-
       ters;  the  case of the letter is important.   All options
       are optional.

       The `-o' option expects exactly one file name  to  follow.
       The  file  name may either immediately follow the option's
       letter (compatible with older assemblers) or it may be the
       next command argument (GNU standard).

       These two command lines are equivalent:
       as  -o  my-object-file.o  mumble.s
       as  -omy-object-file.o  mumble.s

Free Software Foundation  29 March 1996                         3

as(1)                 GNU Development Tools                 as(1)

SEE ALSO
       `as'  entry  in info; Using as: The GNU Assembler; gcc(1),
       ld(1).

COPYING
       Copyright (c) 1991, 1992, 2000 Free  Software  Foundation,
       Inc.

       This  document  is  distributed under the terms of the GNU
       Free Documentation License, version 1.1.  That license  is
       described  in  the sources for this manual page, but it is
       not displayed here in order to make this manual more  con-
       sise.   Copies  of this license can also be obtained from:
       http://www.gnu.org/copyleft/.

Free Software Foundation  29 March 1996                         4

as(1)                 GNU Development Tools                 as(1)

Free Software Foundation  29 March 1996                         5


NAME | SYNOPSIS | DESCRIPTION | OPTIONS | SEE ALSO | COPYING

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

home | help