1<html lang="en"> 2<head> 3<title>Object - Using as</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Using as"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Overview.html#Overview" title="Overview"> 9<link rel="prev" href="Input-Files.html#Input-Files" title="Input Files"> 10<link rel="next" href="Errors.html#Errors" title="Errors"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<!-- 13This file documents the GNU Assembler "as". 14 15Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 162000, 2001, 2002, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 17Inc. 18 19Permission is granted to copy, distribute and/or modify this document 20under the terms of the GNU Free Documentation License, Version 1.3 21or any later version published by the Free Software Foundation; 22with no Invariant Sections, with no Front-Cover Texts, and with no 23Back-Cover Texts. A copy of the license is included in the 24section entitled ``GNU Free Documentation License''. 25 26--> 27<meta http-equiv="Content-Style-Type" content="text/css"> 28<style type="text/css"><!-- 29 pre.display { font-family:inherit } 30 pre.format { font-family:inherit } 31 pre.smalldisplay { font-family:inherit; font-size:smaller } 32 pre.smallformat { font-family:inherit; font-size:smaller } 33 pre.smallexample { font-size:smaller } 34 pre.smalllisp { font-size:smaller } 35 span.sc { font-variant:small-caps } 36 span.roman { font-family:serif; font-weight:normal; } 37 span.sansserif { font-family:sans-serif; font-weight:normal; } 38--></style> 39<link rel="stylesheet" type="text/css" href="../cs.css"> 40</head> 41<body> 42<div class="node"> 43<a name="Object"></a> 44<p> 45Next: <a rel="next" accesskey="n" href="Errors.html#Errors">Errors</a>, 46Previous: <a rel="previous" accesskey="p" href="Input-Files.html#Input-Files">Input Files</a>, 47Up: <a rel="up" accesskey="u" href="Overview.html#Overview">Overview</a> 48<hr> 49</div> 50 51<h3 class="section">1.6 Output (Object) File</h3> 52 53<p><a name="index-object-file-34"></a><a name="index-output-file-35"></a><a name="index-a_002eout-36"></a><a name="index-g_t_002eo-37"></a>Every time you run <samp><span class="command">as</span></samp> it produces an output file, which is 54your assembly language program translated into numbers. This file 55is the object file. Its default name is 56<code>a.out</code>. 57You can give it another name by using the <samp><span class="option">-o</span></samp> option. Conventionally, 58object file names end with <samp><span class="file">.o</span></samp>. The default name is used for historical 59reasons: older assemblers were capable of assembling self-contained programs 60directly into a runnable program. (For some formats, this isn't currently 61possible, but it can be done for the <code>a.out</code> format.) 62 63 <p><a name="index-linker-38"></a><a name="index-ld-39"></a>The object file is meant for input to the linker <code>ld</code>. It contains 64assembled program code, information to help <code>ld</code> integrate 65the assembled program into a runnable file, and (optionally) symbolic 66information for the debugger. 67 68<!-- link above to some info file(s) like the description of a.out. --> 69<!-- don't forget to describe @sc{gnu} info as well as Unix lossage. --> 70 </body></html> 71 72