📄 input-section-example.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="Input%20Section%20Example">Input Section Example</a>,
Previous:<a rel="previous" accesskey="p" href="Input-Section-Keep.html#Input%20Section%20Keep">Input Section Keep</a>,
Up:<a rel="up" accesskey="u" href="Input-Section.html#Input%20Section">Input Section</a>
<hr><br>
</div>
<h5 class="subsubsection">Input section example</h5>
<p>The following example is a complete linker script. It tells the linker
to read all of the sections from file <code>all.o</code> and place them at the
start of output section <code>outputa</code> which starts at location
<code>0x10000</code>. All of section <code>.input1</code> from file <code>foo.o</code>
follows immediately, in the same output section. All of section
<code>.input2</code> from <code>foo.o</code> goes into output section
<code>outputb</code>, followed by section <code>.input1</code> from <code>foo1.o</code>.
All of the remaining <code>.input1</code> and <code>.input2</code> sections from any
files are written to output section <code>outputc</code>.
<pre class="smallexample"> SECTIONS {
outputa 0x10000 :
{
all.o
foo.o (.input1)
}
outputb :
{
foo.o (.input2)
foo1.o (.input1)
}
outputc :
{
*(.input1)
*(.input2)
}
}
</pre>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -