input-section-keep.html

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

HTML
29
字号
<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%20Keep">Input Section Keep</a>,

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

Previous:<a rel="previous" accesskey="p" href="Input-Section-Common.html#Input%20Section%20Common">Input Section Common</a>,

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

<hr><br>

</div>



<h5 class="subsubsection">Input section and garbage collection</h5>



   <p>When link-time garbage collection is in use (<code>--gc-sections</code>),

it is often useful to mark sections that should not be eliminated. 

This is accomplished by surrounding an input section's wildcard entry

with <code>KEEP()</code>, as in <code>KEEP(*(.init))</code> or

<code>KEEP(SORT(*)(.ctors))</code>.



   </body></html>



⌨️ 快捷键说明

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