📄 output-section-type.html
字号:
<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="Output%20Section%20Type">Output Section Type</a>,
Next:<a rel="next" accesskey="n" href="Output-Section-LMA.html#Output%20Section%20LMA">Output Section LMA</a>,
Up:<a rel="up" accesskey="u" href="Output-Section-Attributes.html#Output%20Section%20Attributes">Output Section Attributes</a>
<hr><br>
</div>
<h5 class="subsubsection">Output section type</h5>
<p>Each output section may have a type. The type is a keyword in
parentheses. The following types are defined:
<dl>
<dt><code>NOLOAD</code>
<dd>The section should be marked as not loadable, so that it will not be
loaded into memory when the program is run.
<br><dt><code>DSECT</code>
<dd><dt><code>COPY</code>
<dd><dt><code>INFO</code>
<dd><dt><code>OVERLAY</code>
<dd>These type names are supported for backward compatibility, and are
rarely used. They all have the same effect: the section should be
marked as not allocatable, so that no memory is allocated for the
section when the program is run.
</dl>
<p>The linker normally sets the attributes of an output section based on
the input sections which map into it. You can override this by using
the section type. For example, in the script sample below, the
<code>ROM</code> section is addressed at memory location <code>0</code> and does not
need to be loaded when the program is run. The contents of the
<code>ROM</code> section will appear in the linker output file as usual.
<pre class="smallexample"> SECTIONS {
ROM 0 (NOLOAD) : { ... }
...
}
</pre>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -