⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scripts.html

📁 gcc手册
💻 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="Scripts">Scripts</a>,

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

Previous:<a rel="previous" accesskey="p" href="Invocation.html#Invocation">Invocation</a>,

Up:<a rel="up" accesskey="u" href="index.html#Top">Top</a>

<hr><br>

</div>



<h2 class="chapter">Linker Scripts</h2>



   <p>Every link is controlled by a <dfn>linker script</dfn>.  This script is

written in the linker command language.



   <p>The main purpose of the linker script is to describe how the sections in

the input files should be mapped into the output file, and to control

the memory layout of the output file.  Most linker scripts do nothing

more than this.  However, when necessary, the linker script can also

direct the linker to perform many other operations, using the commands

described below.



   <p>The linker always uses a linker script.  If you do not supply one

yourself, the linker will use a default script that is compiled into the

linker executable.  You can use the <code>--verbose</code> command line option

to display the default linker script.  Certain command line options,

such as <code>-r</code> or <code>-N</code>, will affect the default linker script.



   <p>You may supply your own linker script by using the <code>-T</code> command

line option.  When you do this, your linker script will replace the

default linker script.



   <p>You may also use linker scripts implicitly by naming them as input files

to the linker, as though they were files to be linked.  See <a href="Implicit-Linker-Scripts.html#Implicit%20Linker%20Scripts">Implicit Linker Scripts</a>.



<ul class="menu">

<li><a accesskey="1" href="Basic-Script-Concepts.html#Basic%20Script%20Concepts">Basic Script Concepts</a>: 	Basic Linker Script Concepts

<li><a accesskey="2" href="Script-Format.html#Script%20Format">Script Format</a>: 		Linker Script Format

<li><a accesskey="3" href="Simple-Example.html#Simple%20Example">Simple Example</a>: 		Simple Linker Script Example

<li><a accesskey="4" href="Simple-Commands.html#Simple%20Commands">Simple Commands</a>: 		Simple Linker Script Commands

<li><a accesskey="5" href="Assignments.html#Assignments">Assignments</a>: 			Assigning Values to Symbols

<li><a accesskey="6" href="SECTIONS.html#SECTIONS">SECTIONS</a>: 			SECTIONS Command

<li><a accesskey="7" href="MEMORY.html#MEMORY">MEMORY</a>: 			MEMORY Command

<li><a accesskey="8" href="PHDRS.html#PHDRS">PHDRS</a>: 			PHDRS Command

<li><a accesskey="9" href="VERSION.html#VERSION">VERSION</a>: 			VERSION Command

<li><a href="Expressions.html#Expressions">Expressions</a>: 			Expressions in Linker Scripts

<li><a href="Implicit-Linker-Scripts.html#Implicit%20Linker%20Scripts">Implicit Linker Scripts</a>: 	Implicit Linker Scripts

</ul>



   </body></html>



⌨️ 快捷键说明

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