📄 output-section-fill.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%20Fill">Output Section Fill</a>,
Previous:<a rel="previous" accesskey="p" href="Output-Section-Phdr.html#Output%20Section%20Phdr">Output Section Phdr</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 fill</h5>
<p>You can set the fill pattern for an entire section by using
<code>=</code><var>fillexp</var><code></code>. <var>fillexp</var> is an expression
(see <a href="Expressions.html#Expressions">Expressions</a>). Any otherwise unspecified regions of memory
within the output section (for example, gaps left due to the required
alignment of input sections) will be filled with the value, repeated as
necessary. If the fill expression is a simple hex number, ie. a string
of hex digit starting with <code>0x</code> and without a trailing <code>k</code> or <code>M</code>, then
an arbitrarily long sequence of hex digits can be used to specify the
fill pattern; Leading zeros become part of the pattern too. For all
other cases, including extra parentheses or a unary <code>+</code>, the fill
pattern is the four least significant bytes of the value of the
expression. In all cases, the number is big-endian.
<p>You can also change the fill value with a <code>FILL</code> command in the
output section commands; (see <a href="Output-Section-Data.html#Output%20Section%20Data">Output Section Data</a>).
<p>Here is a simple example:
<pre class="smallexample"> SECTIONS { .text : { *(.text) } =0x90909090 }
</pre>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -