You cannot 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.3 KiB
HTML
133 lines
6.3 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<!-- This file documents the BFD library.
|
|
|
|
Copyright (C) 1991-2019 Free Software Foundation, Inc.
|
|
|
|
Permission is granted to copy, distribute and/or modify this document
|
|
under the terms of the GNU Free Documentation License, Version 1.3 or
|
|
any later version published by the Free Software Foundation; with the
|
|
Invariant Sections being "GNU General Public License" and "Funding
|
|
Free Software", the Front-Cover texts being (a) (see below), and with
|
|
the Back-Cover Texts being (b) (see below). A copy of the license is
|
|
included in the section entitled "GNU Free Documentation License".
|
|
|
|
(a) The FSF's Front-Cover Text is:
|
|
|
|
A GNU Manual
|
|
|
|
(b) The FSF's Back-Cover Text is:
|
|
|
|
You have freedom to copy and modify this GNU Manual, like GNU
|
|
software. Copies published by the Free Software Foundation raise
|
|
funds for GNU development. -->
|
|
<!-- Created by GNU Texinfo 6.4, http://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<title>BFD information loss (Untitled Document)</title>
|
|
|
|
<meta name="description" content="BFD information loss (Untitled Document)">
|
|
<meta name="keywords" content="BFD information loss (Untitled Document)">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="makeinfo">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<link href="index.html#Top" rel="start" title="Top">
|
|
<link href="BFD-Index.html#BFD-Index" rel="index" title="BFD Index">
|
|
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
|
<link href="What-BFD-Version-2-Can-Do.html#What-BFD-Version-2-Can-Do" rel="up" title="What BFD Version 2 Can Do">
|
|
<link href="Canonical-format.html#Canonical-format" rel="next" title="Canonical format">
|
|
<link href="What-BFD-Version-2-Can-Do.html#What-BFD-Version-2-Can-Do" rel="prev" title="What BFD Version 2 Can Do">
|
|
<style type="text/css">
|
|
<!--
|
|
a.summary-letter {text-decoration: none}
|
|
blockquote.indentedblock {margin-right: 0em}
|
|
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
|
|
blockquote.smallquotation {font-size: smaller}
|
|
div.display {margin-left: 3.2em}
|
|
div.example {margin-left: 3.2em}
|
|
div.lisp {margin-left: 3.2em}
|
|
div.smalldisplay {margin-left: 3.2em}
|
|
div.smallexample {margin-left: 3.2em}
|
|
div.smalllisp {margin-left: 3.2em}
|
|
kbd {font-style: oblique}
|
|
pre.display {font-family: inherit}
|
|
pre.format {font-family: inherit}
|
|
pre.menu-comment {font-family: serif}
|
|
pre.menu-preformatted {font-family: serif}
|
|
pre.smalldisplay {font-family: inherit; font-size: smaller}
|
|
pre.smallexample {font-size: smaller}
|
|
pre.smallformat {font-family: inherit; font-size: smaller}
|
|
pre.smalllisp {font-size: smaller}
|
|
span.nolinebreak {white-space: nowrap}
|
|
span.roman {font-family: initial; font-weight: normal}
|
|
span.sansserif {font-family: sans-serif; font-weight: normal}
|
|
ul.no-bullet {list-style: none}
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en">
|
|
<a name="BFD-information-loss"></a>
|
|
<div class="header">
|
|
<p>
|
|
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> [<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>
|
|
</div>
|
|
<hr>
|
|
<a name="Information-Loss"></a>
|
|
<h4 class="subsection">1.3.1 Information Loss</h4>
|
|
|
|
<p><em>Information can be lost during output.</em> The output formats
|
|
supported by BFD do not provide identical facilities, and
|
|
information which can be described in one form has nowhere to go in
|
|
another format. One example of this is alignment information in
|
|
<code>b.out</code>. There is nowhere in an <code>a.out</code> format file to store
|
|
alignment information on the contained data, so when a file is linked
|
|
from <code>b.out</code> and an <code>a.out</code> image is produced, alignment
|
|
information will not propagate to the output file. (The linker will
|
|
still use the alignment information internally, so the link is performed
|
|
correctly).
|
|
</p>
|
|
<p>Another example is COFF section names. COFF files may contain an
|
|
unlimited number of sections, each one with a textual section name. If
|
|
the target of the link is a format which does not have many sections (e.g.,
|
|
<code>a.out</code>) or has sections without names (e.g., the Oasys format), the
|
|
link cannot be done simply. You can circumvent this problem by
|
|
describing the desired input-to-output section mapping with the linker command
|
|
language.
|
|
</p>
|
|
<p><em>Information can be lost during canonicalization.</em> The BFD
|
|
internal canonical form of the external formats is not exhaustive; there
|
|
are structures in input formats for which there is no direct
|
|
representation internally. This means that the BFD back ends
|
|
cannot maintain all possible data richness through the transformation
|
|
between external to internal and back to external formats.
|
|
</p>
|
|
<p>This limitation is only a problem when an application reads one
|
|
format and writes another. Each BFD back end is responsible for
|
|
maintaining as much data as possible, and the internal BFD
|
|
canonical form has structures which are opaque to the BFD core,
|
|
and exported only to the back ends. When a file is read in one format,
|
|
the canonical form is generated for BFD and the application. At the
|
|
same time, the back end saves away any information which may otherwise
|
|
be lost. If the data is then written back in the same format, the back
|
|
end routine will be able to use the canonical form provided by the
|
|
BFD core as well as the information it prepared earlier. Since
|
|
there is a great deal of commonality between back ends,
|
|
there is no information lost when
|
|
linking or copying big endian COFF to little endian COFF, or <code>a.out</code> to
|
|
<code>b.out</code>. When a mixture of formats is linked, the information is
|
|
only lost from the files whose format differs from the destination.
|
|
</p>
|
|
<hr>
|
|
<div class="header">
|
|
<p>
|
|
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> [<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>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|