entry-point.html

来自「gcc手册」· HTML 代码 · 共 39 行

HTML
39
字号
<html lang="en">

<head>

<title>Untitled</title>

<meta http-equiv="Content-Type" content="text/html">

<meta name="description" content="Untitled">

<meta name="generator" content="makeinfo 4.3">

<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">

</head>

<body>

<div class="node">

<p>

Node:<a name="Entry%20Point">Entry Point</a>,

Next:<a rel="next" accesskey="n" href="File-Commands.html#File%20Commands">File Commands</a>,

Up:<a rel="up" accesskey="u" href="Simple-Commands.html#Simple%20Commands">Simple Commands</a>

<hr><br>

</div>



<h4 class="subsection">Setting the entry point</h4>



   <p>The first instruction to execute in a program is called the <dfn>entry

point</dfn>.  You can use the <code>ENTRY</code> linker script command to set the

entry point.  The argument is a symbol name:

<pre class="smallexample">     ENTRY(<var>symbol</var>)

     </pre>



   <p>There are several ways to set the entry point.  The linker will set the

entry point by trying each of the following methods in order, and

stopping when one of them succeeds:

     <ul>

<li>the <code>-e</code> <var>entry</var> command-line option;

<li>the <code>ENTRY(</code><var>symbol</var><code>)</code> command in a linker script;

<li>the value of the symbol <code>start</code>, if defined;

<li>the address of the first byte of the <code>.text</code> section, if present;

<li>The address <code>0</code>. 

</ul>



   </body></html>



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?