You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
8.1 KiB
HTML
149 lines
8.1 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<!-- This file documents the GNU Assembler "as".
|
|
|
|
Copyright (C) 1991-2019 Free Software Foundation, Inc.
|
|
|
|
Permission is granted to copy, distribute and/or modify this document
|
|
under the terms of the GNU Free Documentation License, Version 1.3
|
|
or any later version published by the Free Software Foundation;
|
|
with no Invariant Sections, with no Front-Cover Texts, and with no
|
|
Back-Cover Texts. A copy of the license is included in the
|
|
section entitled "GNU Free Documentation License".
|
|
-->
|
|
<!-- Created by GNU Texinfo 6.4, http://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<title>Invoking (Using as)</title>
|
|
|
|
<meta name="description" content="Invoking (Using as)">
|
|
<meta name="keywords" content="Invoking (Using as)">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="makeinfo">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<link href="index.html#Top" rel="start" title="Top">
|
|
<link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
|
|
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
|
<link href="index.html#Top" rel="up" title="Top">
|
|
<link href="a.html#a" rel="next" title="a">
|
|
<link href="Errors.html#Errors" rel="prev" title="Errors">
|
|
<style type="text/css">
|
|
<!--
|
|
a.summary-letter {text-decoration: none}
|
|
blockquote.indentedblock {margin-right: 0em}
|
|
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
|
|
blockquote.smallquotation {font-size: smaller}
|
|
div.display {margin-left: 3.2em}
|
|
div.example {margin-left: 3.2em}
|
|
div.lisp {margin-left: 3.2em}
|
|
div.smalldisplay {margin-left: 3.2em}
|
|
div.smallexample {margin-left: 3.2em}
|
|
div.smalllisp {margin-left: 3.2em}
|
|
kbd {font-style: oblique}
|
|
pre.display {font-family: inherit}
|
|
pre.format {font-family: inherit}
|
|
pre.menu-comment {font-family: serif}
|
|
pre.menu-preformatted {font-family: serif}
|
|
pre.smalldisplay {font-family: inherit; font-size: smaller}
|
|
pre.smallexample {font-size: smaller}
|
|
pre.smallformat {font-family: inherit; font-size: smaller}
|
|
pre.smalllisp {font-size: smaller}
|
|
span.nolinebreak {white-space: nowrap}
|
|
span.roman {font-family: initial; font-weight: normal}
|
|
span.sansserif {font-family: sans-serif; font-weight: normal}
|
|
ul.no-bullet {list-style: none}
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en">
|
|
<a name="Invoking"></a>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Syntax.html#Syntax" accesskey="n" rel="next">Syntax</a>, Previous: <a href="Overview.html#Overview" accesskey="p" rel="prev">Overview</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
<hr>
|
|
<a name="Command_002dLine-Options"></a>
|
|
<h2 class="chapter">2 Command-Line Options</h2>
|
|
|
|
<a name="index-options_002c-all-versions-of-assembler"></a>
|
|
<p>This chapter describes command-line options available in <em>all</em>
|
|
versions of the <small>GNU</small> assembler; see <a href="Machine-Dependencies.html#Machine-Dependencies">Machine Dependencies</a>,
|
|
for options specific
|
|
to particular machine architectures.
|
|
</p>
|
|
|
|
<p>If you are invoking <code>as</code> via the <small>GNU</small> C compiler,
|
|
you can use the ‘<samp>-Wa</samp>’ option to pass arguments through to the assembler.
|
|
The assembler arguments must be separated from each other (and the ‘<samp>-Wa</samp>’)
|
|
by commas. For example:
|
|
</p>
|
|
<div class="smallexample">
|
|
<pre class="smallexample">gcc -c -g -O -Wa,-alh,-L file.c
|
|
</pre></div>
|
|
|
|
<p>This passes two options to the assembler: ‘<samp>-alh</samp>’ (emit a listing to
|
|
standard output with high-level and assembly source) and ‘<samp>-L</samp>’ (retain
|
|
local symbols in the symbol table).
|
|
</p>
|
|
<p>Usually you do not need to use this ‘<samp>-Wa</samp>’ mechanism, since many compiler
|
|
command-line options are automatically passed to the assembler by the compiler.
|
|
(You can call the <small>GNU</small> compiler driver with the ‘<samp>-v</samp>’ option to see
|
|
precisely what options it passes to each compilation pass, including the
|
|
assembler.)
|
|
</p>
|
|
|
|
<table class="menu" border="0" cellspacing="0">
|
|
<tr><td align="left" valign="top">• <a href="a.html#a" accesskey="1">a</a>:</td><td> </td><td align="left" valign="top">-a[cdghlns] enable listings
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="alternate.html#alternate" accesskey="2">alternate</a>:</td><td> </td><td align="left" valign="top">–alternate enable alternate macro syntax
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="D.html#D" accesskey="3">D</a>:</td><td> </td><td align="left" valign="top">-D for compatibility
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="f.html#f" accesskey="4">f</a>:</td><td> </td><td align="left" valign="top">-f to work faster
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="I.html#I" accesskey="5">I</a>:</td><td> </td><td align="left" valign="top">-I for .include search path
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="K.html#K" accesskey="6">K</a>:</td><td> </td><td align="left" valign="top">-K for difference tables
|
|
</td></tr>
|
|
<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
|
|
|
|
</pre></th></tr><tr><td align="left" valign="top">• <a href="L.html#L" accesskey="7">L</a>:</td><td> </td><td align="left" valign="top">-L to retain local symbols
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="listing.html#listing" accesskey="8">listing</a>:</td><td> </td><td align="left" valign="top">–listing-XXX to configure listing output
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="M.html#M" accesskey="9">M</a>:</td><td> </td><td align="left" valign="top">-M or –mri to assemble in MRI compatibility mode
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="MD.html#MD">MD</a>:</td><td> </td><td align="left" valign="top">–MD for dependency tracking
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="no_002dpad_002dsections.html#no_002dpad_002dsections">no-pad-sections</a>:</td><td> </td><td align="left" valign="top">–no-pad-sections to stop section padding
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="o.html#o">o</a>:</td><td> </td><td align="left" valign="top">-o to name the object file
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="R.html#R">R</a>:</td><td> </td><td align="left" valign="top">-R to join data and text sections
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="statistics.html#statistics">statistics</a>:</td><td> </td><td align="left" valign="top">–statistics to see statistics about assembly
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="traditional_002dformat.html#traditional_002dformat">traditional-format</a>:</td><td> </td><td align="left" valign="top">–traditional-format for compatible output
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="v.html#v">v</a>:</td><td> </td><td align="left" valign="top">-v to announce version
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="W.html#W">W</a>:</td><td> </td><td align="left" valign="top">-W, –no-warn, –warn, –fatal-warnings to control warnings
|
|
</td></tr>
|
|
<tr><td align="left" valign="top">• <a href="Z.html#Z">Z</a>:</td><td> </td><td align="left" valign="top">-Z to make object file even after errors
|
|
</td></tr>
|
|
</table>
|
|
|
|
<hr>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Syntax.html#Syntax" accesskey="n" rel="next">Syntax</a>, Previous: <a href="Overview.html#Overview" accesskey="p" rel="prev">Overview</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|