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.

133 lines
6.3KB

  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>BFD information loss (Untitled Document)</title>
  22. <meta name="description" content="BFD information loss (Untitled Document)">
  23. <meta name="keywords" content="BFD information loss (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="What-BFD-Version-2-Can-Do.html#What-BFD-Version-2-Can-Do" rel="up" title="What BFD Version 2 Can Do">
  31. <link href="Canonical-format.html#Canonical-format" rel="next" title="Canonical format">
  32. <link href="What-BFD-Version-2-Can-Do.html#What-BFD-Version-2-Can-Do" rel="prev" title="What BFD Version 2 Can Do">
  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="BFD-information-loss"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="Canonical-format.html#Canonical-format" accesskey="n" rel="next">Canonical format</a>, Up: <a href="What-BFD-Version-2-Can-Do.html#What-BFD-Version-2-Can-Do" accesskey="u" rel="up">What BFD Version 2 Can Do</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="Information-Loss"></a>
  69. <h4 class="subsection">1.3.1 Information Loss</h4>
  70. <p><em>Information can be lost during output.</em> The output formats
  71. supported by BFD do not provide identical facilities, and
  72. information which can be described in one form has nowhere to go in
  73. another format. One example of this is alignment information in
  74. <code>b.out</code>. There is nowhere in an <code>a.out</code> format file to store
  75. alignment information on the contained data, so when a file is linked
  76. from <code>b.out</code> and an <code>a.out</code> image is produced, alignment
  77. information will not propagate to the output file. (The linker will
  78. still use the alignment information internally, so the link is performed
  79. correctly).
  80. </p>
  81. <p>Another example is COFF section names. COFF files may contain an
  82. unlimited number of sections, each one with a textual section name. If
  83. the target of the link is a format which does not have many sections (e.g.,
  84. <code>a.out</code>) or has sections without names (e.g., the Oasys format), the
  85. link cannot be done simply. You can circumvent this problem by
  86. describing the desired input-to-output section mapping with the linker command
  87. language.
  88. </p>
  89. <p><em>Information can be lost during canonicalization.</em> The BFD
  90. internal canonical form of the external formats is not exhaustive; there
  91. are structures in input formats for which there is no direct
  92. representation internally. This means that the BFD back ends
  93. cannot maintain all possible data richness through the transformation
  94. between external to internal and back to external formats.
  95. </p>
  96. <p>This limitation is only a problem when an application reads one
  97. format and writes another. Each BFD back end is responsible for
  98. maintaining as much data as possible, and the internal BFD
  99. canonical form has structures which are opaque to the BFD core,
  100. and exported only to the back ends. When a file is read in one format,
  101. the canonical form is generated for BFD and the application. At the
  102. same time, the back end saves away any information which may otherwise
  103. be lost. If the data is then written back in the same format, the back
  104. end routine will be able to use the canonical form provided by the
  105. BFD core as well as the information it prepared earlier. Since
  106. there is a great deal of commonality between back ends,
  107. there is no information lost when
  108. linking or copying big endian COFF to little endian COFF, or <code>a.out</code> to
  109. <code>b.out</code>. When a mixture of formats is linked, the information is
  110. only lost from the files whose format differs from the destination.
  111. </p>
  112. <hr>
  113. <div class="header">
  114. <p>
  115. Next: <a href="Canonical-format.html#Canonical-format" accesskey="n" rel="next">Canonical format</a>, Up: <a href="What-BFD-Version-2-Can-Do.html#What-BFD-Version-2-Can-Do" accesskey="u" rel="up">What BFD Version 2 Can Do</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>
  116. </div>
  117. </body>
  118. </html>