Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

115 Zeilen
5.5KB

  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 BFD library.
  4. Copyright (C) 1991-2020 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.3 or
  7. any later version published by the Free Software Foundation; with the
  8. Invariant Sections being "GNU General Public License" and "Funding
  9. Free Software", the Front-Cover texts being (a) (see below), and with
  10. the Back-Cover Texts being (b) (see below). A copy of the license is
  11. included in the section entitled "GNU Free Documentation License".
  12. (a) The FSF's Front-Cover Text is:
  13. A GNU Manual
  14. (b) The FSF's Back-Cover Text is:
  15. You have freedom to copy and modify this GNU Manual, like GNU
  16. software. Copies published by the Free Software Foundation raise
  17. funds for GNU development. -->
  18. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  19. <head>
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  21. <title>Performing the Final Link (Untitled Document)</title>
  22. <meta name="description" content="Performing the Final Link (Untitled Document)">
  23. <meta name="keywords" content="Performing the Final Link (Untitled Document)">
  24. <meta name="resource-type" content="document">
  25. <meta name="distribution" content="global">
  26. <meta name="Generator" content="makeinfo">
  27. <link href="index.html#Top" rel="start" title="Top">
  28. <link href="BFD-Index.html#BFD-Index" rel="index" title="BFD Index">
  29. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  30. <link href="Linker-Functions.html#Linker-Functions" rel="up" title="Linker Functions">
  31. <link href="Information-provided-by-the-linker.html#Information-provided-by-the-linker" rel="next" title="Information provided by the linker">
  32. <link href="Adding-symbols-from-an-archive.html#Adding-symbols-from-an-archive" rel="prev" title="Adding symbols from an archive">
  33. <style type="text/css">
  34. <!--
  35. a.summary-letter {text-decoration: none}
  36. blockquote.indentedblock {margin-right: 0em}
  37. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  38. blockquote.smallquotation {font-size: smaller}
  39. div.display {margin-left: 3.2em}
  40. div.example {margin-left: 3.2em}
  41. div.lisp {margin-left: 3.2em}
  42. div.smalldisplay {margin-left: 3.2em}
  43. div.smallexample {margin-left: 3.2em}
  44. div.smalllisp {margin-left: 3.2em}
  45. kbd {font-style: oblique}
  46. pre.display {font-family: inherit}
  47. pre.format {font-family: inherit}
  48. pre.menu-comment {font-family: serif}
  49. pre.menu-preformatted {font-family: serif}
  50. pre.smalldisplay {font-family: inherit; font-size: smaller}
  51. pre.smallexample {font-size: smaller}
  52. pre.smallformat {font-family: inherit; font-size: smaller}
  53. pre.smalllisp {font-size: smaller}
  54. span.nolinebreak {white-space: nowrap}
  55. span.roman {font-family: initial; font-weight: normal}
  56. span.sansserif {font-family: sans-serif; font-weight: normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en">
  62. <a name="Performing-the-Final-Link"></a>
  63. <div class="header">
  64. <p>
  65. Previous: <a href="Adding-Symbols-to-the-Hash-Table.html#Adding-Symbols-to-the-Hash-Table" accesskey="p" rel="prev">Adding Symbols to the Hash Table</a>, Up: <a href="Linker-Functions.html#Linker-Functions" accesskey="u" rel="up">Linker Functions</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="BFD-Index.html#BFD-Index" title="Index" rel="index">Index</a>]</p>
  66. </div>
  67. <hr>
  68. <a name="Performing-the-final-link"></a>
  69. <h4 class="subsection">2.17.3 Performing the final link</h4>
  70. <a name="index-_005fbfd_005flink_005ffinal_005flink-in-target-vector"></a>
  71. <a name="index-target-vector-_0028_005fbfd_005ffinal_005flink_0029"></a>
  72. <p>When all the input files have been processed, the linker calls
  73. the <code>_bfd_final_link</code> entry point of the output BFD. This
  74. routine is responsible for producing the final output file,
  75. which has several aspects. It must relocate the contents of
  76. the input sections and copy the data into the output sections.
  77. It must build an output symbol table including any local
  78. symbols from the input files and the global symbols from the
  79. hash table. When producing relocatable output, it must
  80. modify the input relocs and write them into the output file.
  81. There may also be object format dependent work to be done.
  82. </p>
  83. <p>The linker will also call the <code>write_object_contents</code> entry
  84. point when the BFD is closed. The two entry points must work
  85. together in order to produce the correct output file.
  86. </p>
  87. <p>The details of how this works are inevitably dependent upon
  88. the specific object file format. The a.out
  89. <code>_bfd_final_link</code> routine is <code>NAME(aout,final_link)</code>.
  90. </p>
  91. <table class="menu" border="0" cellspacing="0">
  92. <tr><td align="left" valign="top">&bull; <a href="Information-provided-by-the-linker.html#Information-provided-by-the-linker" accesskey="1">Information provided by the linker</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  93. </td></tr>
  94. <tr><td align="left" valign="top">&bull; <a href="Relocating-the-section-contents.html#Relocating-the-section-contents" accesskey="2">Relocating the section contents</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  95. </td></tr>
  96. <tr><td align="left" valign="top">&bull; <a href="Writing-the-symbol-table.html#Writing-the-symbol-table" accesskey="3">Writing the symbol table</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
  97. </td></tr>
  98. </table>
  99. </body>
  100. </html>