1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<!-- This file documents the GNU linker LD 4(GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 5version 2.36.1. 6 7Copyright (C) 1991-2021 Free Software Foundation, Inc. 8 9Permission is granted to copy, distribute and/or modify this document 10under the terms of the GNU Free Documentation License, Version 1.3 11or any later version published by the Free Software Foundation; 12with no Invariant Sections, with no Front-Cover Texts, and with no 13Back-Cover Texts. A copy of the license is included in the 14section entitled "GNU Free Documentation License". --> 15<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> 16<head> 17<title>LD: Top</title> 18 19<meta name="description" content="LD: Top"> 20<meta name="keywords" content="LD: Top"> 21<meta name="resource-type" content="document"> 22<meta name="distribution" content="global"> 23<meta name="Generator" content="makeinfo"> 24<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 25<link href="#Top" rel="start" title="Top"> 26<link href="LD-Index.html#LD-Index" rel="index" title="LD Index"> 27<link href="#SEC_Contents" rel="contents" title="Table of Contents"> 28<link href="../dir/index.html" rel="up" title="(dir)"> 29<link href="Overview.html#Overview" rel="next" title="Overview"> 30<style type="text/css"> 31<!-- 32a.summary-letter {text-decoration: none} 33blockquote.smallquotation {font-size: smaller} 34div.display {margin-left: 3.2em} 35div.example {margin-left: 3.2em} 36div.indentedblock {margin-left: 3.2em} 37div.lisp {margin-left: 3.2em} 38div.smalldisplay {margin-left: 3.2em} 39div.smallexample {margin-left: 3.2em} 40div.smallindentedblock {margin-left: 3.2em; font-size: smaller} 41div.smalllisp {margin-left: 3.2em} 42kbd {font-style:oblique} 43pre.display {font-family: inherit} 44pre.format {font-family: inherit} 45pre.menu-comment {font-family: serif} 46pre.menu-preformatted {font-family: serif} 47pre.smalldisplay {font-family: inherit; font-size: smaller} 48pre.smallexample {font-size: smaller} 49pre.smallformat {font-family: inherit; font-size: smaller} 50pre.smalllisp {font-size: smaller} 51span.nocodebreak {white-space:nowrap} 52span.nolinebreak {white-space:nowrap} 53span.roman {font-family:serif; font-weight:normal} 54span.sansserif {font-family:sans-serif; font-weight:normal} 55ul.no-bullet {list-style: none} 56--> 57</style> 58 59 60</head> 61 62<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> 63 64 65 66 67 68 69 70 71 72<a name="SEC_Contents"></a> 73<h2 class="contents-heading">Table of Contents</h2> 74 75<div class="contents"> 76 77<ul class="no-bullet"> 78 <li><a name="toc-Overview-1" href="Overview.html#Overview">1 Overview</a></li> 79 <li><a name="toc-Invocation-1" href="Invocation.html#Invocation">2 Invocation</a> 80 <ul class="no-bullet"> 81 <li><a name="toc-Command_002dline-Options" href="Options.html#Options">2.1 Command-line Options</a> 82 <ul class="no-bullet"> 83 <li><a name="toc-Options-Specific-to-i386-PE-Targets" href="Options.html#Options-Specific-to-i386-PE-Targets">2.1.1 Options Specific to i386 PE Targets</a></li> 84 <li><a name="toc-Options-specific-to-C6X-uClinux-targets" href="Options.html#Options-specific-to-C6X-uClinux-targets">2.1.2 Options specific to C6X uClinux targets</a></li> 85 <li><a name="toc-Options-specific-to-C_002dSKY-targets" href="Options.html#Options-specific-to-C_002dSKY-targets">2.1.3 Options specific to C-SKY targets</a></li> 86 <li><a name="toc-Options-specific-to-Motorola-68HC11-and-68HC12-targets" href="Options.html#Options-specific-to-Motorola-68HC11-and-68HC12-targets">2.1.4 Options specific to Motorola 68HC11 and 68HC12 targets</a></li> 87 <li><a name="toc-Options-specific-to-Motorola-68K-target" href="Options.html#Options-specific-to-Motorola-68K-target">2.1.5 Options specific to Motorola 68K target</a></li> 88 <li><a name="toc-Options-specific-to-MIPS-targets" href="Options.html#Options-specific-to-MIPS-targets">2.1.6 Options specific to MIPS targets</a></li> 89 <li><a name="toc-Options-specific-to-PDP11-targets" href="Options.html#Options-specific-to-PDP11-targets">2.1.7 Options specific to PDP11 targets</a></li> 90 </ul></li> 91 <li><a name="toc-Environment-Variables" href="Environment.html#Environment">2.2 Environment Variables</a></li> 92 </ul></li> 93 <li><a name="toc-Linker-Scripts" href="Scripts.html#Scripts">3 Linker Scripts</a> 94 <ul class="no-bullet"> 95 <li><a name="toc-Basic-Linker-Script-Concepts" href="Basic-Script-Concepts.html#Basic-Script-Concepts">3.1 Basic Linker Script Concepts</a></li> 96 <li><a name="toc-Linker-Script-Format" href="Script-Format.html#Script-Format">3.2 Linker Script Format</a></li> 97 <li><a name="toc-Simple-Linker-Script-Example" href="Simple-Example.html#Simple-Example">3.3 Simple Linker Script Example</a></li> 98 <li><a name="toc-Simple-Linker-Script-Commands" href="Simple-Commands.html#Simple-Commands">3.4 Simple Linker Script Commands</a> 99 <ul class="no-bullet"> 100 <li><a name="toc-Setting-the-Entry-Point" href="Entry-Point.html#Entry-Point">3.4.1 Setting the Entry Point</a></li> 101 <li><a name="toc-Commands-Dealing-with-Files" href="File-Commands.html#File-Commands">3.4.2 Commands Dealing with Files</a></li> 102 <li><a name="toc-Commands-Dealing-with-Object-File-Formats" href="Format-Commands.html#Format-Commands">3.4.3 Commands Dealing with Object File Formats</a></li> 103 <li><a name="toc-Assign-alias-names-to-memory-regions" href="REGION_005fALIAS.html#REGION_005fALIAS">3.4.4 Assign alias names to memory regions</a></li> 104 <li><a name="toc-Other-Linker-Script-Commands" href="Miscellaneous-Commands.html#Miscellaneous-Commands">3.4.5 Other Linker Script Commands</a></li> 105 </ul></li> 106 <li><a name="toc-Assigning-Values-to-Symbols" href="Assignments.html#Assignments">3.5 Assigning Values to Symbols</a> 107 <ul class="no-bullet"> 108 <li><a name="toc-Simple-Assignments-1" href="Simple-Assignments.html#Simple-Assignments">3.5.1 Simple Assignments</a></li> 109 <li><a name="toc-HIDDEN-1" href="HIDDEN.html#HIDDEN">3.5.2 HIDDEN</a></li> 110 <li><a name="toc-PROVIDE-1" href="PROVIDE.html#PROVIDE">3.5.3 PROVIDE</a></li> 111 <li><a name="toc-PROVIDE_005fHIDDEN-1" href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN">3.5.4 PROVIDE_HIDDEN</a></li> 112 <li><a name="toc-Source-Code-Reference-1" href="Source-Code-Reference.html#Source-Code-Reference">3.5.5 Source Code Reference</a></li> 113 </ul></li> 114 <li><a name="toc-SECTIONS-Command" href="SECTIONS.html#SECTIONS">3.6 SECTIONS Command</a> 115 <ul class="no-bullet"> 116 <li><a name="toc-Output-Section-Description-1" href="Output-Section-Description.html#Output-Section-Description">3.6.1 Output Section Description</a></li> 117 <li><a name="toc-Output-Section-Name-1" href="Output-Section-Name.html#Output-Section-Name">3.6.2 Output Section Name</a></li> 118 <li><a name="toc-Output-Section-Address-1" href="Output-Section-Address.html#Output-Section-Address">3.6.3 Output Section Address</a></li> 119 <li><a name="toc-Input-Section-Description" href="Input-Section.html#Input-Section">3.6.4 Input Section Description</a> 120 <ul class="no-bullet"> 121 <li><a name="toc-Input-Section-Basics-1" href="Input-Section-Basics.html#Input-Section-Basics">3.6.4.1 Input Section Basics</a></li> 122 <li><a name="toc-Input-Section-Wildcard-Patterns" href="Input-Section-Wildcards.html#Input-Section-Wildcards">3.6.4.2 Input Section Wildcard Patterns</a></li> 123 <li><a name="toc-Input-Section-for-Common-Symbols" href="Input-Section-Common.html#Input-Section-Common">3.6.4.3 Input Section for Common Symbols</a></li> 124 <li><a name="toc-Input-Section-and-Garbage-Collection" href="Input-Section-Keep.html#Input-Section-Keep">3.6.4.4 Input Section and Garbage Collection</a></li> 125 <li><a name="toc-Input-Section-Example-1" href="Input-Section-Example.html#Input-Section-Example">3.6.4.5 Input Section Example</a></li> 126 </ul></li> 127 <li><a name="toc-Output-Section-Data-1" href="Output-Section-Data.html#Output-Section-Data">3.6.5 Output Section Data</a></li> 128 <li><a name="toc-Output-Section-Keywords-1" href="Output-Section-Keywords.html#Output-Section-Keywords">3.6.6 Output Section Keywords</a></li> 129 <li><a name="toc-Output-Section-Discarding-1" href="Output-Section-Discarding.html#Output-Section-Discarding">3.6.7 Output Section Discarding</a></li> 130 <li><a name="toc-Output-Section-Attributes-1" href="Output-Section-Attributes.html#Output-Section-Attributes">3.6.8 Output Section Attributes</a> 131 <ul class="no-bullet"> 132 <li><a name="toc-Output-Section-Type-1" href="Output-Section-Type.html#Output-Section-Type">3.6.8.1 Output Section Type</a></li> 133 <li><a name="toc-Output-Section-LMA-1" href="Output-Section-LMA.html#Output-Section-LMA">3.6.8.2 Output Section LMA</a></li> 134 <li><a name="toc-Forced-Output-Alignment-1" href="Forced-Output-Alignment.html#Forced-Output-Alignment">3.6.8.3 Forced Output Alignment</a></li> 135 <li><a name="toc-Forced-Input-Alignment-1" href="Forced-Input-Alignment.html#Forced-Input-Alignment">3.6.8.4 Forced Input Alignment</a></li> 136 <li><a name="toc-Output-Section-Constraint-1" href="Output-Section-Constraint.html#Output-Section-Constraint">3.6.8.5 Output Section Constraint</a></li> 137 <li><a name="toc-Output-Section-Region-1" href="Output-Section-Region.html#Output-Section-Region">3.6.8.6 Output Section Region</a></li> 138 <li><a name="toc-Output-Section-Phdr-1" href="Output-Section-Phdr.html#Output-Section-Phdr">3.6.8.7 Output Section Phdr</a></li> 139 <li><a name="toc-Output-Section-Fill-1" href="Output-Section-Fill.html#Output-Section-Fill">3.6.8.8 Output Section Fill</a></li> 140 </ul></li> 141 <li><a name="toc-Overlay-Description-1" href="Overlay-Description.html#Overlay-Description">3.6.9 Overlay Description</a></li> 142 </ul></li> 143 <li><a name="toc-MEMORY-Command" href="MEMORY.html#MEMORY">3.7 MEMORY Command</a></li> 144 <li><a name="toc-PHDRS-Command" href="PHDRS.html#PHDRS">3.8 PHDRS Command</a></li> 145 <li><a name="toc-VERSION-Command" href="VERSION.html#VERSION">3.9 VERSION Command</a></li> 146 <li><a name="toc-Expressions-in-Linker-Scripts" href="Expressions.html#Expressions">3.10 Expressions in Linker Scripts</a> 147 <ul class="no-bullet"> 148 <li><a name="toc-Constants-1" href="Constants.html#Constants">3.10.1 Constants</a></li> 149 <li><a name="toc-Symbolic-Constants-1" href="Symbolic-Constants.html#Symbolic-Constants">3.10.2 Symbolic Constants</a></li> 150 <li><a name="toc-Symbol-Names" href="Symbols.html#Symbols">3.10.3 Symbol Names</a></li> 151 <li><a name="toc-Orphan-Sections-1" href="Orphan-Sections.html#Orphan-Sections">3.10.4 Orphan Sections</a></li> 152 <li><a name="toc-The-Location-Counter" href="Location-Counter.html#Location-Counter">3.10.5 The Location Counter</a></li> 153 <li><a name="toc-Operators-1" href="Operators.html#Operators">3.10.6 Operators</a></li> 154 <li><a name="toc-Evaluation-1" href="Evaluation.html#Evaluation">3.10.7 Evaluation</a></li> 155 <li><a name="toc-The-Section-of-an-Expression" href="Expression-Section.html#Expression-Section">3.10.8 The Section of an Expression</a></li> 156 <li><a name="toc-Builtin-Functions-1" href="Builtin-Functions.html#Builtin-Functions">3.10.9 Builtin Functions</a></li> 157 </ul></li> 158 <li><a name="toc-Implicit-Linker-Scripts-1" href="Implicit-Linker-Scripts.html#Implicit-Linker-Scripts">3.11 Implicit Linker Scripts</a></li> 159 </ul></li> 160 <li><a name="toc-Linker-Plugins" href="Plugins.html#Plugins">4 Linker Plugins</a> 161 <ul class="no-bullet"> 162 <li><a name="toc-Static-Library-Dependencies-Plugin" href="libdep-Plugin.html#libdep-Plugin">4.1 Static Library Dependencies Plugin</a></li> 163 </ul></li> 164 <li><a name="toc-Machine-Dependent-Features" href="Machine-Dependent.html#Machine-Dependent">5 Machine Dependent Features</a> 165 <ul class="no-bullet"> 166 <li><a name="toc-ld-and-the-H8_002f300" href="H8_002f300.html#H8_002f300">5.1 <code>ld</code> and the H8/300</a></li> 167 <li><a name="toc-ld-and-the-Motorola-68HC11-and-68HC12-families" href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">5.2 <code>ld</code> and the Motorola 68HC11 and 68HC12 families</a> 168 <ul class="no-bullet"> 169 <li><a name="toc-Linker-Relaxation" href="M68HC11_002f68HC12.html#Linker-Relaxation">5.2.1 Linker Relaxation</a></li> 170 <li><a name="toc-Trampoline-Generation" href="M68HC11_002f68HC12.html#Trampoline-Generation">5.2.2 Trampoline Generation</a></li> 171 </ul></li> 172 <li><a name="toc-ld-and-the-ARM-family" href="ARM.html#ARM">5.3 <code>ld</code> and the ARM family</a></li> 173 <li><a name="toc-ld-and-HPPA-32_002dbit-ELF-Support" href="HPPA-ELF32.html#HPPA-ELF32">5.4 <code>ld</code> and HPPA 32-bit ELF Support</a></li> 174 <li><a name="toc-ld-and-the-Motorola-68K-family" href="M68K.html#M68K">5.5 <code>ld</code> and the Motorola 68K family</a></li> 175 <li><a name="toc-ld-and-the-MIPS-family" href="MIPS.html#MIPS">5.6 <code>ld</code> and the MIPS family</a></li> 176 <li><a name="toc-ld-and-MMIX" href="MMIX.html#MMIX">5.7 <code>ld</code> and MMIX</a></li> 177 <li><a name="toc-ld-and-MSP430" href="MSP430.html#MSP430">5.8 <code>ld</code> and MSP430</a></li> 178 <li><a name="toc-ld-and-NDS32" href="NDS32.html#NDS32">5.9 <code>ld</code> and NDS32</a></li> 179 <li><a name="toc-ld-and-the-Altera-Nios-II" href="Nios-II.html#Nios-II">5.10 <code>ld</code> and the Altera Nios II</a></li> 180 <li><a name="toc-ld-and-PowerPC-32_002dbit-ELF-Support" href="PowerPC-ELF32.html#PowerPC-ELF32">5.11 <code>ld</code> and PowerPC 32-bit ELF Support</a></li> 181 <li><a name="toc-ld-and-PowerPC64-64_002dbit-ELF-Support" href="PowerPC64-ELF64.html#PowerPC64-ELF64">5.12 <code>ld</code> and PowerPC64 64-bit ELF Support</a></li> 182 <li><a name="toc-ld-and-S_002f390-ELF-Support" href="S_002f390-ELF.html#S_002f390-ELF">5.13 <code>ld</code> and S/390 ELF Support</a></li> 183 <li><a name="toc-ld-and-SPU-ELF-Support" href="SPU-ELF.html#SPU-ELF">5.14 <code>ld</code> and SPU ELF Support</a></li> 184 <li><a name="toc-ld_0027s-Support-for-Various-TI-COFF-Versions" href="TI-COFF.html#TI-COFF">5.15 <code>ld</code>’s Support for Various TI COFF Versions</a></li> 185 <li><a name="toc-ld-and-WIN32-_0028cygwin_002fmingw_0029" href="WIN32.html#WIN32">5.16 <code>ld</code> and WIN32 (cygwin/mingw)</a></li> 186 <li><a name="toc-ld-and-Xtensa-Processors" href="Xtensa.html#Xtensa">5.17 <code>ld</code> and Xtensa Processors</a></li> 187 </ul></li> 188 <li><a name="toc-BFD-1" href="BFD.html#BFD">6 BFD</a> 189 <ul class="no-bullet"> 190 <li><a name="toc-How-It-Works_003a-An-Outline-of-BFD" href="BFD-outline.html#BFD-outline">6.1 How It Works: An Outline of BFD</a> 191 <ul class="no-bullet"> 192 <li><a name="toc-Information-Loss" href="BFD-information-loss.html#BFD-information-loss">6.1.1 Information Loss</a></li> 193 <li><a name="toc-The-BFD-canonical-object_002dfile-format" href="Canonical-format.html#Canonical-format">6.1.2 The BFD canonical object-file format</a></li> 194 </ul></li> 195 </ul></li> 196 <li><a name="toc-Reporting-Bugs-1" href="Reporting-Bugs.html#Reporting-Bugs">7 Reporting Bugs</a> 197 <ul class="no-bullet"> 198 <li><a name="toc-Have-You-Found-a-Bug_003f" href="Bug-Criteria.html#Bug-Criteria">7.1 Have You Found a Bug?</a></li> 199 <li><a name="toc-How-to-Report-Bugs" href="Bug-Reporting.html#Bug-Reporting">7.2 How to Report Bugs</a></li> 200 </ul></li> 201 <li><a name="toc-MRI-Compatible-Script-Files" href="MRI.html#MRI">Appendix A MRI Compatible Script Files</a></li> 202 <li><a name="toc-GNU-Free-Documentation-License-1" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">Appendix B GNU Free Documentation License</a></li> 203 <li><a name="toc-LD-Index-1" href="LD-Index.html#LD-Index">LD Index</a></li> 204</ul> 205</div> 206 207 208<a name="Top"></a> 209<div class="header"> 210<p> 211Next: <a href="Overview.html#Overview" accesskey="n" rel="next">Overview</a>, Up: <a href="../dir/index.html" accesskey="u" rel="up">(dir)</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="LD-Index.html#LD-Index" title="Index" rel="index">Index</a>]</p> 212</div> 213<hr> 214<a name="LD"></a> 215<h1 class="top">LD</h1> 216<p>This file documents the <small>GNU</small> linker ld 217(GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 218version 2.36.1. 219</p> 220<p>This document is distributed under the terms of the GNU Free 221Documentation License version 1.3. A copy of the license is included 222in the section entitled “GNU Free Documentation License”. 223</p> 224<table class="menu" border="0" cellspacing="0"> 225<tr><td align="left" valign="top">• <a href="Overview.html#Overview" accesskey="1">Overview</a>:</td><td> </td><td align="left" valign="top">Overview 226</td></tr> 227<tr><td align="left" valign="top">• <a href="Invocation.html#Invocation" accesskey="2">Invocation</a>:</td><td> </td><td align="left" valign="top">Invocation 228</td></tr> 229<tr><td align="left" valign="top">• <a href="Scripts.html#Scripts" accesskey="3">Scripts</a>:</td><td> </td><td align="left" valign="top">Linker Scripts 230</td></tr> 231<tr><td align="left" valign="top">• <a href="Plugins.html#Plugins" accesskey="4">Plugins</a>:</td><td> </td><td align="left" valign="top">Linker Plugins 232</td></tr> 233<tr><td align="left" valign="top">• <a href="Machine-Dependent.html#Machine-Dependent" accesskey="5">Machine Dependent</a>:</td><td> </td><td align="left" valign="top">Machine Dependent Features 234</td></tr> 235<tr><td align="left" valign="top">• <a href="BFD.html#BFD" accesskey="6">BFD</a>:</td><td> </td><td align="left" valign="top">BFD 236</td></tr> 237<tr><th colspan="3" align="left" valign="top"><pre class="menu-comment"> 238</pre></th></tr><tr><td align="left" valign="top">• <a href="Reporting-Bugs.html#Reporting-Bugs" accesskey="7">Reporting Bugs</a>:</td><td> </td><td align="left" valign="top">Reporting Bugs 239</td></tr> 240<tr><td align="left" valign="top">• <a href="MRI.html#MRI" accesskey="8">MRI</a>:</td><td> </td><td align="left" valign="top">MRI Compatible Script Files 241</td></tr> 242<tr><td align="left" valign="top">• <a href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" accesskey="9">GNU Free Documentation License</a>:</td><td> </td><td align="left" valign="top">GNU Free Documentation License 243</td></tr> 244<tr><td align="left" valign="top">• <a href="LD-Index.html#LD-Index">LD Index</a>:</td><td> </td><td align="left" valign="top">LD Index 245</td></tr> 246</table> 247 248<hr> 249<div class="header"> 250<p> 251Next: <a href="Overview.html#Overview" accesskey="n" rel="next">Overview</a>, Up: <a href="../dir/index.html" accesskey="u" rel="up">(dir)</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="LD-Index.html#LD-Index" title="Index" rel="index">Index</a>]</p> 252</div> 253 254 255 256</body> 257</html> 258