You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

252 lines
18KB

  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 Arm Embedded Toolchain 10-2020-q4-major)
  5. version 2.35.1.
  6. Copyright (C) 1991-2020 Free Software Foundation, Inc.
  7. Permission is granted to copy, distribute and/or modify this document
  8. under the terms of the GNU Free Documentation License, Version 1.3
  9. or any later version published by the Free Software Foundation;
  10. with no Invariant Sections, with no Front-Cover Texts, and with no
  11. Back-Cover Texts. A copy of the license is included in the
  12. section entitled "GNU Free Documentation License". -->
  13. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  16. <title>Top (LD)</title>
  17. <meta name="description" content="Top (LD)">
  18. <meta name="keywords" content="Top (LD)">
  19. <meta name="resource-type" content="document">
  20. <meta name="distribution" content="global">
  21. <meta name="Generator" content="makeinfo">
  22. <link href="#Top" rel="start" title="Top">
  23. <link href="LD-Index.html#LD-Index" rel="index" title="LD Index">
  24. <link href="#SEC_Contents" rel="contents" title="Table of Contents">
  25. <link href="../dir/index.html" rel="up" title="(dir)">
  26. <link href="Overview.html#Overview" rel="next" title="Overview">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.indentedblock {margin-right: 0em}
  31. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  32. blockquote.smallquotation {font-size: smaller}
  33. div.display {margin-left: 3.2em}
  34. div.example {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style: oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nolinebreak {white-space: nowrap}
  49. span.roman {font-family: initial; font-weight: normal}
  50. span.sansserif {font-family: sans-serif; font-weight: normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en">
  56. <a name="SEC_Contents"></a>
  57. <h2 class="contents-heading">Table of Contents</h2>
  58. <div class="contents">
  59. <ul class="no-bullet">
  60. <li><a name="toc-Overview-1" href="Overview.html#Overview">1 Overview</a></li>
  61. <li><a name="toc-Invocation-1" href="Invocation.html#Invocation">2 Invocation</a>
  62. <ul class="no-bullet">
  63. <li><a name="toc-Command_002dline-Options" href="Options.html#Options">2.1 Command-line Options</a>
  64. <ul class="no-bullet">
  65. <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>
  66. <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>
  67. <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>
  68. <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>
  69. <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>
  70. <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>
  71. <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>
  72. </ul></li>
  73. <li><a name="toc-Environment-Variables" href="Environment.html#Environment">2.2 Environment Variables</a></li>
  74. </ul></li>
  75. <li><a name="toc-Linker-Scripts" href="Scripts.html#Scripts">3 Linker Scripts</a>
  76. <ul class="no-bullet">
  77. <li><a name="toc-Basic-Linker-Script-Concepts" href="Basic-Script-Concepts.html#Basic-Script-Concepts">3.1 Basic Linker Script Concepts</a></li>
  78. <li><a name="toc-Linker-Script-Format" href="Script-Format.html#Script-Format">3.2 Linker Script Format</a></li>
  79. <li><a name="toc-Simple-Linker-Script-Example" href="Simple-Example.html#Simple-Example">3.3 Simple Linker Script Example</a></li>
  80. <li><a name="toc-Simple-Linker-Script-Commands" href="Simple-Commands.html#Simple-Commands">3.4 Simple Linker Script Commands</a>
  81. <ul class="no-bullet">
  82. <li><a name="toc-Setting-the-Entry-Point" href="Entry-Point.html#Entry-Point">3.4.1 Setting the Entry Point</a></li>
  83. <li><a name="toc-Commands-Dealing-with-Files" href="File-Commands.html#File-Commands">3.4.2 Commands Dealing with Files</a></li>
  84. <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>
  85. <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>
  86. <li><a name="toc-Other-Linker-Script-Commands" href="Miscellaneous-Commands.html#Miscellaneous-Commands">3.4.5 Other Linker Script Commands</a></li>
  87. </ul></li>
  88. <li><a name="toc-Assigning-Values-to-Symbols" href="Assignments.html#Assignments">3.5 Assigning Values to Symbols</a>
  89. <ul class="no-bullet">
  90. <li><a name="toc-Simple-Assignments-1" href="Simple-Assignments.html#Simple-Assignments">3.5.1 Simple Assignments</a></li>
  91. <li><a name="toc-HIDDEN-1" href="HIDDEN.html#HIDDEN">3.5.2 HIDDEN</a></li>
  92. <li><a name="toc-PROVIDE-1" href="PROVIDE.html#PROVIDE">3.5.3 PROVIDE</a></li>
  93. <li><a name="toc-PROVIDE_005fHIDDEN-1" href="PROVIDE_005fHIDDEN.html#PROVIDE_005fHIDDEN">3.5.4 PROVIDE_HIDDEN</a></li>
  94. <li><a name="toc-Source-Code-Reference-1" href="Source-Code-Reference.html#Source-Code-Reference">3.5.5 Source Code Reference</a></li>
  95. </ul></li>
  96. <li><a name="toc-SECTIONS-Command" href="SECTIONS.html#SECTIONS">3.6 SECTIONS Command</a>
  97. <ul class="no-bullet">
  98. <li><a name="toc-Output-Section-Description-1" href="Output-Section-Description.html#Output-Section-Description">3.6.1 Output Section Description</a></li>
  99. <li><a name="toc-Output-Section-Name-1" href="Output-Section-Name.html#Output-Section-Name">3.6.2 Output Section Name</a></li>
  100. <li><a name="toc-Output-Section-Address-1" href="Output-Section-Address.html#Output-Section-Address">3.6.3 Output Section Address</a></li>
  101. <li><a name="toc-Input-Section-Description" href="Input-Section.html#Input-Section">3.6.4 Input Section Description</a>
  102. <ul class="no-bullet">
  103. <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>
  104. <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>
  105. <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>
  106. <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>
  107. <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>
  108. </ul></li>
  109. <li><a name="toc-Output-Section-Data-1" href="Output-Section-Data.html#Output-Section-Data">3.6.5 Output Section Data</a></li>
  110. <li><a name="toc-Output-Section-Keywords-1" href="Output-Section-Keywords.html#Output-Section-Keywords">3.6.6 Output Section Keywords</a></li>
  111. <li><a name="toc-Output-Section-Discarding-1" href="Output-Section-Discarding.html#Output-Section-Discarding">3.6.7 Output Section Discarding</a></li>
  112. <li><a name="toc-Output-Section-Attributes-1" href="Output-Section-Attributes.html#Output-Section-Attributes">3.6.8 Output Section Attributes</a>
  113. <ul class="no-bullet">
  114. <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>
  115. <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>
  116. <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>
  117. <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>
  118. <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>
  119. <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>
  120. <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>
  121. <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>
  122. </ul></li>
  123. <li><a name="toc-Overlay-Description-1" href="Overlay-Description.html#Overlay-Description">3.6.9 Overlay Description</a></li>
  124. </ul></li>
  125. <li><a name="toc-MEMORY-Command" href="MEMORY.html#MEMORY">3.7 MEMORY Command</a></li>
  126. <li><a name="toc-PHDRS-Command" href="PHDRS.html#PHDRS">3.8 PHDRS Command</a></li>
  127. <li><a name="toc-VERSION-Command" href="VERSION.html#VERSION">3.9 VERSION Command</a></li>
  128. <li><a name="toc-Expressions-in-Linker-Scripts" href="Expressions.html#Expressions">3.10 Expressions in Linker Scripts</a>
  129. <ul class="no-bullet">
  130. <li><a name="toc-Constants-1" href="Constants.html#Constants">3.10.1 Constants</a></li>
  131. <li><a name="toc-Symbolic-Constants-1" href="Symbolic-Constants.html#Symbolic-Constants">3.10.2 Symbolic Constants</a></li>
  132. <li><a name="toc-Symbol-Names" href="Symbols.html#Symbols">3.10.3 Symbol Names</a></li>
  133. <li><a name="toc-Orphan-Sections-1" href="Orphan-Sections.html#Orphan-Sections">3.10.4 Orphan Sections</a></li>
  134. <li><a name="toc-The-Location-Counter" href="Location-Counter.html#Location-Counter">3.10.5 The Location Counter</a></li>
  135. <li><a name="toc-Operators-1" href="Operators.html#Operators">3.10.6 Operators</a></li>
  136. <li><a name="toc-Evaluation-1" href="Evaluation.html#Evaluation">3.10.7 Evaluation</a></li>
  137. <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>
  138. <li><a name="toc-Builtin-Functions-1" href="Builtin-Functions.html#Builtin-Functions">3.10.9 Builtin Functions</a></li>
  139. </ul></li>
  140. <li><a name="toc-Implicit-Linker-Scripts-1" href="Implicit-Linker-Scripts.html#Implicit-Linker-Scripts">3.11 Implicit Linker Scripts</a></li>
  141. </ul></li>
  142. <li><a name="toc-Machine-Dependent-Features" href="Machine-Dependent.html#Machine-Dependent">4 Machine Dependent Features</a>
  143. <ul class="no-bullet">
  144. <li><a name="toc-ld-and-the-H8_002f300" href="H8_002f300.html#H8_002f300">4.1 <code>ld</code> and the H8/300</a></li>
  145. <li><a name="toc-ld-and-the-Motorola-68HC11-and-68HC12-families" href="M68HC11_002f68HC12.html#M68HC11_002f68HC12">4.2 <code>ld</code> and the Motorola 68HC11 and 68HC12 families</a>
  146. <ul class="no-bullet">
  147. <li><a name="toc-Linker-Relaxation" href="M68HC11_002f68HC12.html#Linker-Relaxation">4.2.1 Linker Relaxation</a></li>
  148. <li><a name="toc-Trampoline-Generation" href="M68HC11_002f68HC12.html#Trampoline-Generation">4.2.2 Trampoline Generation</a></li>
  149. </ul></li>
  150. <li><a name="toc-ld-and-the-ARM-family" href="ARM.html#ARM">4.3 <code>ld</code> and the ARM family</a></li>
  151. <li><a name="toc-ld-and-HPPA-32_002dbit-ELF-Support" href="HPPA-ELF32.html#HPPA-ELF32">4.4 <code>ld</code> and HPPA 32-bit ELF Support</a></li>
  152. <li><a name="toc-ld-and-the-Motorola-68K-family" href="M68K.html#M68K">4.5 <code>ld</code> and the Motorola 68K family</a></li>
  153. <li><a name="toc-ld-and-the-MIPS-family" href="MIPS.html#MIPS">4.6 <code>ld</code> and the MIPS family</a></li>
  154. <li><a name="toc-ld-and-MMIX" href="MMIX.html#MMIX">4.7 <code>ld</code> and MMIX</a></li>
  155. <li><a name="toc-ld-and-MSP430" href="MSP430.html#MSP430">4.8 <code>ld</code> and MSP430</a></li>
  156. <li><a name="toc-ld-and-NDS32" href="NDS32.html#NDS32">4.9 <code>ld</code> and NDS32</a></li>
  157. <li><a name="toc-ld-and-the-Altera-Nios-II" href="Nios-II.html#Nios-II">4.10 <code>ld</code> and the Altera Nios II</a></li>
  158. <li><a name="toc-ld-and-PowerPC-32_002dbit-ELF-Support" href="PowerPC-ELF32.html#PowerPC-ELF32">4.11 <code>ld</code> and PowerPC 32-bit ELF Support</a></li>
  159. <li><a name="toc-ld-and-PowerPC64-64_002dbit-ELF-Support" href="PowerPC64-ELF64.html#PowerPC64-ELF64">4.12 <code>ld</code> and PowerPC64 64-bit ELF Support</a></li>
  160. <li><a name="toc-ld-and-S_002f390-ELF-Support" href="S_002f390-ELF.html#S_002f390-ELF">4.13 <code>ld</code> and S/390 ELF Support</a></li>
  161. <li><a name="toc-ld-and-SPU-ELF-Support" href="SPU-ELF.html#SPU-ELF">4.14 <code>ld</code> and SPU ELF Support</a></li>
  162. <li><a name="toc-ld_0027s-Support-for-Various-TI-COFF-Versions" href="TI-COFF.html#TI-COFF">4.15 <code>ld</code>&rsquo;s Support for Various TI COFF Versions</a></li>
  163. <li><a name="toc-ld-and-WIN32-_0028cygwin_002fmingw_0029" href="WIN32.html#WIN32">4.16 <code>ld</code> and WIN32 (cygwin/mingw)</a></li>
  164. <li><a name="toc-ld-and-Xtensa-Processors" href="Xtensa.html#Xtensa">4.17 <code>ld</code> and Xtensa Processors</a></li>
  165. </ul></li>
  166. <li><a name="toc-BFD-1" href="BFD.html#BFD">5 BFD</a>
  167. <ul class="no-bullet">
  168. <li><a name="toc-How-It-Works_003a-An-Outline-of-BFD" href="BFD-outline.html#BFD-outline">5.1 How It Works: An Outline of BFD</a>
  169. <ul class="no-bullet">
  170. <li><a name="toc-Information-Loss" href="BFD-information-loss.html#BFD-information-loss">5.1.1 Information Loss</a></li>
  171. <li><a name="toc-The-BFD-canonical-object_002dfile-format" href="Canonical-format.html#Canonical-format">5.1.2 The BFD canonical object-file format</a></li>
  172. </ul></li>
  173. </ul></li>
  174. <li><a name="toc-Reporting-Bugs-1" href="Reporting-Bugs.html#Reporting-Bugs">6 Reporting Bugs</a>
  175. <ul class="no-bullet">
  176. <li><a name="toc-Have-You-Found-a-Bug_003f" href="Bug-Criteria.html#Bug-Criteria">6.1 Have You Found a Bug?</a></li>
  177. <li><a name="toc-How-to-Report-Bugs" href="Bug-Reporting.html#Bug-Reporting">6.2 How to Report Bugs</a></li>
  178. </ul></li>
  179. <li><a name="toc-MRI-Compatible-Script-Files" href="MRI.html#MRI">Appendix A MRI Compatible Script Files</a></li>
  180. <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>
  181. <li><a name="toc-LD-Index-1" href="LD-Index.html#LD-Index">LD Index</a></li>
  182. </ul>
  183. </div>
  184. <a name="Top"></a>
  185. <div class="header">
  186. <p>
  187. Next: <a href="Overview.html#Overview" accesskey="n" rel="next">Overview</a>, Up: <a href="../dir/index.html" accesskey="u" rel="up">(dir)</a> &nbsp; [<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>
  188. </div>
  189. <hr>
  190. <a name="LD"></a>
  191. <h1 class="top">LD</h1>
  192. <p>This file documents the <small>GNU</small> linker ld
  193. (GNU Arm Embedded Toolchain 10-2020-q4-major)
  194. version 2.35.1.
  195. </p>
  196. <p>This document is distributed under the terms of the GNU Free
  197. Documentation License version 1.3. A copy of the license is included
  198. in the section entitled &ldquo;GNU Free Documentation License&rdquo;.
  199. </p>
  200. <table class="menu" border="0" cellspacing="0">
  201. <tr><td align="left" valign="top">&bull; <a href="Overview.html#Overview" accesskey="1">Overview</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Overview
  202. </td></tr>
  203. <tr><td align="left" valign="top">&bull; <a href="Invocation.html#Invocation" accesskey="2">Invocation</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Invocation
  204. </td></tr>
  205. <tr><td align="left" valign="top">&bull; <a href="Scripts.html#Scripts" accesskey="3">Scripts</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Linker Scripts
  206. </td></tr>
  207. <tr><td align="left" valign="top">&bull; <a href="Machine-Dependent.html#Machine-Dependent" accesskey="4">Machine Dependent</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Machine Dependent Features
  208. </td></tr>
  209. <tr><td align="left" valign="top">&bull; <a href="BFD.html#BFD" accesskey="5">BFD</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">BFD
  210. </td></tr>
  211. <tr><th colspan="3" align="left" valign="top"><pre class="menu-comment">
  212. </pre></th></tr><tr><td align="left" valign="top">&bull; <a href="Reporting-Bugs.html#Reporting-Bugs" accesskey="6">Reporting Bugs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Reporting Bugs
  213. </td></tr>
  214. <tr><td align="left" valign="top">&bull; <a href="MRI.html#MRI" accesskey="7">MRI</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">MRI Compatible Script Files
  215. </td></tr>
  216. <tr><td align="left" valign="top">&bull; <a href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" accesskey="8">GNU Free Documentation License</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">GNU Free Documentation License
  217. </td></tr>
  218. <tr><td align="left" valign="top">&bull; <a href="LD-Index.html#LD-Index" accesskey="9">LD Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">LD Index
  219. </td></tr>
  220. </table>
  221. <hr>
  222. <div class="header">
  223. <p>
  224. Next: <a href="Overview.html#Overview" accesskey="n" rel="next">Overview</a>, Up: <a href="../dir/index.html" accesskey="u" rel="up">(dir)</a> &nbsp; [<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>
  225. </div>
  226. </body>
  227. </html>