OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [libstdc++-v3/] [doc/] [html/] [manual/] [abi.html] - Blame information for rev 424

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 424 jeremybenn
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ABI Policy and Guidelines</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><meta name="keywords" content="&#10;      C++&#10;    , &#10;      ABI&#10;    , &#10;      version&#10;    , &#10;      dynamic&#10;    , &#10;      shared&#10;    , &#10;      compatibility&#10;    " /><meta name="keywords" content="&#10;      ISO C++&#10;    , &#10;      library&#10;    " /><link rel="home" href="../spine.html" title="The GNU C++ Library Documentation" /><link rel="up" href="appendix_porting.html" title="Appendix B.  Porting and Maintenance" /><link rel="prev" href="test.html" title="Test" /><link rel="next" href="api.html" title="API Evolution and Deprecation History" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ABI Policy and Guidelines</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><th width="60%" align="center">Appendix B. 
4
  Porting and Maintenance
5
 
6
</th><td width="20%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr></table><hr /></div><div class="sect1" title="ABI Policy and Guidelines"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendix.porting.abi"></a>ABI Policy and Guidelines</h2></div></div></div><p>
7
</p><div class="sect2" title="The C++ Interface"><div class="titlepage"><div><div><h3 class="title"><a id="abi.cxx_interface"></a>The C++ Interface</h3></div></div></div><p>
8
  C++ applications often dependent on specific language support
9
  routines, say for throwing exceptions, or catching exceptions, and
10
  perhaps also dependent on features in the C++ Standard Library.
11
</p><p>
12
  The C++ Standard Library has many include files, types defined in
13
  those include files, specific named functions, and other
14
  behavior. The text of these behaviors, as written in source include
15
  files, is called the Application Programing Interface, or API.
16
</p><p>
17
  Furthermore, C++ source that is compiled into object files is
18
  transformed by the compiler: it arranges objects with specific
19
  alignment and in a particular layout, mangling names according to a
20
  well-defined algorithm, has specific arrangements for the support of
21
  virtual functions, etc. These details are defined as the compiler
22
  Application Binary Interface, or ABI. The GNU C++ compiler uses an
23
  industry-standard C++ ABI starting with version 3. Details can be
24
  found in the <a class="ulink" href="http://www.codesourcery.com/cxx-abi/abi.html" target="_top"> ABI
25
  specification</a>.
26
</p><p>
27
 The GNU C++ compiler, g++, has a compiler command line option to
28
  switch between various different C++ ABIs. This explicit version
29
  switch is the flag <code class="code">-fabi-version</code>. In addition, some
30
  g++ command line options may change the ABI as a side-effect of
31
  use. Such flags include <code class="code">-fpack-struct</code> and
32
  <code class="code">-fno-exceptions</code>, but include others: see the complete
33
  list in the GCC manual under the heading <a class="ulink" href="http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code%20Gen%20Options" target="_top">Options
34
  for Code Generation Conventions</a>.
35
</p><p>
36
  The configure options used when building a specific libstdc++
37
  version may also impact the resulting library ABI. The available
38
  configure options, and their impact on the library ABI, are
39
  documented
40
<a class="link" href="configure.html" title="Configure">here</a>.
41
</p><p> Putting all of these ideas together results in the C++ Standard
42
library ABI, which is the compilation of a given library API by a
43
given compiler ABI. In a nutshell:
44
</p><p>
45
  <span class="quote">“<span class="quote">
46
    library API + compiler ABI = library ABI
47
  </span>”</span>
48
</p><p>
49
 The library ABI is mostly of interest for end-users who have
50
 unresolved symbols and are linking dynamically to the C++ Standard
51
 library, and who thus must be careful to compile their application
52
 with a compiler that is compatible with the available C++ Standard
53
 library binary. In this case, compatible is defined with the equation
54
 above: given an application compiled with a given compiler ABI and
55
 library API, it will work correctly with a Standard C++ Library
56
 created with the same constraints.
57
</p><p>
58
  To use a specific version of the C++ ABI, one must use a
59
  corresponding GNU C++ toolchain (i.e., g++ and libstdc++) that
60
  implements the C++ ABI in question.
61
</p></div><div class="sect2" title="Versioning"><div class="titlepage"><div><div><h3 class="title"><a id="abi.versioning"></a>Versioning</h3></div></div></div><p> The C++ interface has evolved throughout the history of the GNU
62
C++ toolchain. With each release, various details have been changed so
63
as to give distinct versions to the C++ interface.
64
</p><div class="sect3" title="Goals"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.goals"></a>Goals</h4></div></div></div><p>Extending existing, stable ABIs. Versioning gives subsequent
65
releases of library binaries the ability to add new symbols and add
66
functionality, all the while retaining compatibility with the previous
67
releases in the series. Thus, program binaries linked with the initial
68
release of a library binary will still link correctly if the library
69
binary is replaced by carefully-managed subsequent library
70
binaries. This is called forward compatibility.
71
</p><p>
72
The reverse (backwards compatibility) is not true. It is not possible
73
to take program binaries linked with the latest version of a library
74
binary in a release series (with additional symbols added), substitute
75
in the initial release of the library binary, and remain link
76
compatible.
77
</p><p>Allows multiple, incompatible ABIs to coexist at the same time.
78
</p></div><div class="sect3" title="History"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.history"></a>History</h4></div></div></div><p>
79
 How can this complexity be managed? What does C++ versioning mean?
80
  Because library and compiler changes often make binaries compiled
81
  with one version of the GNU tools incompatible with binaries
82
  compiled with other (either newer or older) versions of the same GNU
83
  tools, specific techniques are used to make managing this complexity
84
  easier.
85
</p><p>
86
  The following techniques are used:
87
</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Release versioning on the libgcc_s.so binary. </p><p>This is implemented via file names and the ELF
88
    <code class="constant">DT_SONAME</code> mechanism (at least on ELF
89
    systems). It is versioned as follows:
90
    </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>gcc-3.0.0: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.0.1: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.0.2: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.0.3: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.0.4: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.1.0: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.1.1: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.2.0: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.2.1: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.2.2: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.2.3: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.3.0: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.3.1: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.3.2: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.3.3: libgcc_s.so.1</p></li><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-5].x: on m68k-linux and
91
    hppa-linux this is either libgcc_s.so.1 (when configuring
92
    <code class="code">--with-sjlj-exceptions</code>) or libgcc_s.so.2. For all
93
    others, this is libgcc_s.so.1.  </p></li></ul></div></li><li class="listitem"><p>Symbol versioning on the libgcc_s.so binary.</p><p>It is versioned with the following labels and version
94
   definitions, where the version definition is the maximum for a
95
   particular release. Labels are cumulative. If a particular release
96
   is not listed, it has the same version labels as the preceding
97
   release.</p><p>This corresponds to the mapfile: gcc/libgcc-std.ver</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>gcc-3.0.0: GCC_3.0</p></li><li class="listitem"><p>gcc-3.3.0: GCC_3.3</p></li><li class="listitem"><p>gcc-3.3.1: GCC_3.3.1</p></li><li class="listitem"><p>gcc-3.3.2: GCC_3.3.2</p></li><li class="listitem"><p>gcc-3.3.4: GCC_3.3.4</p></li><li class="listitem"><p>gcc-3.4.0: GCC_3.4</p></li><li class="listitem"><p>gcc-3.4.2: GCC_3.4.2</p></li><li class="listitem"><p>gcc-3.4.4: GCC_3.4.4</p></li><li class="listitem"><p>gcc-4.0.0: GCC_4.0.0</p></li><li class="listitem"><p>gcc-4.1.0: GCC_4.1.0</p></li><li class="listitem"><p>gcc-4.2.0: GCC_4.2.0</p></li><li class="listitem"><p>gcc-4.3.0: GCC_4.3.0</p></li><li class="listitem"><p>gcc-4.4.0: GCC_4.4.0</p></li></ul></div></li><li class="listitem"><p>
98
        Release versioning on the libstdc++.so binary, implemented in
99
        the same was as the libgcc_s.so binary above. Listed is the
100
        filename: <code class="constant">DT_SONAME</code> can be deduced from
101
        the filename by removing the last two period-delimited numbers. For
102
        example, filename <code class="filename">libstdc++.so.5.0.4</code>
103
        corresponds to a <code class="constant">DT_SONAME</code> of
104
        <code class="constant">libstdc++.so.5</code>. Binaries with equivalent
105
        <code class="constant">DT_SONAME</code>s are forward-compatibile: in
106
        the table below, releases incompatible with the previous
107
        one are explicitly noted.
108
      </p><p>It is versioned as follows:
109
    </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>gcc-3.0.0: libstdc++.so.3.0.0</p></li><li class="listitem"><p>gcc-3.0.1: libstdc++.so.3.0.1</p></li><li class="listitem"><p>gcc-3.0.2: libstdc++.so.3.0.2</p></li><li class="listitem"><p>gcc-3.0.3: libstdc++.so.3.0.2 (See Note 1)</p></li><li class="listitem"><p>gcc-3.0.4: libstdc++.so.3.0.4</p></li><li class="listitem"><p>gcc-3.1.0: libstdc++.so.4.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>gcc-3.1.1: libstdc++.so.4.0.1</p></li><li class="listitem"><p>gcc-3.2.0: libstdc++.so.5.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>gcc-3.2.1: libstdc++.so.5.0.1</p></li><li class="listitem"><p>gcc-3.2.2: libstdc++.so.5.0.2</p></li><li class="listitem"><p>gcc-3.2.3: libstdc++.so.5.0.3 (See Note 2)</p></li><li class="listitem"><p>gcc-3.3.0: libstdc++.so.5.0.4</p></li><li class="listitem"><p>gcc-3.3.1: libstdc++.so.5.0.5</p></li><li class="listitem"><p>gcc-3.3.2: libstdc++.so.5.0.5</p></li><li class="listitem"><p>gcc-3.3.3: libstdc++.so.5.0.5</p></li><li class="listitem"><p>gcc-3.4.0: libstdc++.so.6.0.0 <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li><li class="listitem"><p>gcc-3.4.1: libstdc++.so.6.0.1</p></li><li class="listitem"><p>gcc-3.4.2: libstdc++.so.6.0.2</p></li><li class="listitem"><p>gcc-3.4.3: libstdc++.so.6.0.3</p></li><li class="listitem"><p>gcc-3.4.4: libstdc++.so.6.0.3</p></li><li class="listitem"><p>gcc-3.4.5: libstdc++.so.6.0.3</p></li><li class="listitem"><p>gcc-3.4.6: libstdc++.so.6.0.3</p></li><li class="listitem"><p>gcc-4.0.0: libstdc++.so.6.0.4</p></li><li class="listitem"><p>gcc-4.0.1: libstdc++.so.6.0.5</p></li><li class="listitem"><p>gcc-4.0.2: libstdc++.so.6.0.6</p></li><li class="listitem"><p>gcc-4.0.3: libstdc++.so.6.0.7</p></li><li class="listitem"><p>gcc-4.1.0: libstdc++.so.6.0.7</p></li><li class="listitem"><p>gcc-4.1.1: libstdc++.so.6.0.8</p></li><li class="listitem"><p>gcc-4.1.2: libstdc++.so.6.0.8</p></li><li class="listitem"><p>gcc-4.2.0: libstdc++.so.6.0.9</p></li><li class="listitem"><p>gcc-4.2.1: libstdc++.so.6.0.9 (See Note 3)</p></li><li class="listitem"><p>gcc-4.2.2: libstdc++.so.6.0.9</p></li><li class="listitem"><p>gcc-4.2.3: libstdc++.so.6.0.9</p></li><li class="listitem"><p>gcc-4.2.4: libstdc++.so.6.0.9</p></li><li class="listitem"><p>gcc-4.3.0: libstdc++.so.6.0.10</p></li><li class="listitem"><p>gcc-4.3.1: libstdc++.so.6.0.10</p></li><li class="listitem"><p>gcc-4.3.2: libstdc++.so.6.0.10</p></li><li class="listitem"><p>gcc-4.3.3: libstdc++.so.6.0.10</p></li><li class="listitem"><p>gcc-4.3.4: libstdc++.so.6.0.10</p></li><li class="listitem"><p>gcc-4.4.0: libstdc++.so.6.0.11</p></li><li class="listitem"><p>gcc-4.4.1: libstdc++.so.6.0.12</p></li><li class="listitem"><p>gcc-4.4.2: libstdc++.so.6.0.13</p></li><li class="listitem"><p>gcc-4.5.0: libstdc++.so.6.0.14</p></li></ul></div><p>
110
      Note 1: Error should be libstdc++.so.3.0.3.
111
    </p><p>
112
      Note 2: Not strictly required.
113
    </p><p>
114
      Note 3: This release (but not previous or subsequent) has one
115
      known incompatibility, see <a class="ulink" href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33678" target="_top">33678</a>
116
      in the GCC bug database.
117
    </p></li><li class="listitem"><p>Symbol versioning on the libstdc++.so binary.</p><p>mapfile: libstdc++/config/linker-map.gnu</p><p>It is versioned with the following labels and version
118
   definitions, where the version definition is the maximum for a
119
   particular release. Note, only symbol which are newly introduced
120
   will use the maximum version definition. Thus, for release series
121
   with the same label, but incremented version definitions, the later
122
   release has both versions. (An example of this would be the
123
   gcc-3.2.1 release, which has GLIBCPP_3.2.1 for new symbols and
124
   GLIBCPP_3.2 for symbols that were introduced in the gcc-3.2.0
125
   release.) If a particular release is not listed, it has the same
126
   version labels as the preceding release.
127
   </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>gcc-3.0.0: (Error, not versioned)</p></li><li class="listitem"><p>gcc-3.0.1: (Error, not versioned)</p></li><li class="listitem"><p>gcc-3.0.2: (Error, not versioned)</p></li><li class="listitem"><p>gcc-3.0.3: (Error, not versioned)</p></li><li class="listitem"><p>gcc-3.0.4: (Error, not versioned)</p></li><li class="listitem"><p>gcc-3.1.0: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>gcc-3.1.1: GLIBCPP_3.1, CXXABI_1</p></li><li class="listitem"><p>gcc-3.2.0: GLIBCPP_3.2, CXXABI_1.2</p></li><li class="listitem"><p>gcc-3.2.1: GLIBCPP_3.2.1, CXXABI_1.2</p></li><li class="listitem"><p>gcc-3.2.2: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>gcc-3.2.3: GLIBCPP_3.2.2, CXXABI_1.2</p></li><li class="listitem"><p>gcc-3.3.0: GLIBCPP_3.2.2, CXXABI_1.2.1</p></li><li class="listitem"><p>gcc-3.3.1: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>gcc-3.3.2: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>gcc-3.3.3: GLIBCPP_3.2.3, CXXABI_1.2.1</p></li><li class="listitem"><p>gcc-3.4.0: GLIBCXX_3.4, CXXABI_1.3</p></li><li class="listitem"><p>gcc-3.4.1: GLIBCXX_3.4.1, CXXABI_1.3</p></li><li class="listitem"><p>gcc-3.4.2: GLIBCXX_3.4.2</p></li><li class="listitem"><p>gcc-3.4.3: GLIBCXX_3.4.3</p></li><li class="listitem"><p>gcc-4.0.0: GLIBCXX_3.4.4, CXXABI_1.3.1</p></li><li class="listitem"><p>gcc-4.0.1: GLIBCXX_3.4.5</p></li><li class="listitem"><p>gcc-4.0.2: GLIBCXX_3.4.6</p></li><li class="listitem"><p>gcc-4.0.3: GLIBCXX_3.4.7</p></li><li class="listitem"><p>gcc-4.1.1: GLIBCXX_3.4.8</p></li><li class="listitem"><p>gcc-4.2.0: GLIBCXX_3.4.9</p></li><li class="listitem"><p>gcc-4.3.0: GLIBCXX_3.4.10, CXXABI_1.3.2</p></li><li class="listitem"><p>gcc-4.4.0: GLIBCXX_3.4.11, CXXABI_1.3.3</p></li><li class="listitem"><p>gcc-4.4.1: GLIBCXX_3.4.12, CXXABI_1.3.3</p></li><li class="listitem"><p>gcc-4.4.2: GLIBCXX_3.4.13, CXXABI_1.3.3</p></li><li class="listitem"><p>gcc-4.5.0: GLIBCXX_3.4.14, CXXABI_1.3.4</p></li></ul></div></li><li class="listitem"><p>Incremental bumping of a compiler pre-defined macro,
128
    __GXX_ABI_VERSION. This macro is defined as the version of the
129
    compiler v3 ABI, with g++ 3.0.x being version 100. This macro will
130
    be automatically defined whenever g++ is used (the curious can
131
    test this by invoking g++ with the '-v' flag.)
132
    </p><p>
133
    This macro was defined in the file "lang-specs.h" in the gcc/cp directory.
134
    Later versions defined it in "c-common.c" in the gcc directory, and from
135
    G++ 3.4 it is defined in c-cppbuiltin.c and its value determined by the
136
    '-fabi-version' command line option.
137
    </p><p>
138
    It is versioned as follows, where 'n' is given by '-fabi-version=n':
139
    </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>gcc-3.0.x: 100</p></li><li class="listitem"><p>gcc-3.1.x: 100 (Error, should be 101)</p></li><li class="listitem"><p>gcc-3.2.x: 102</p></li><li class="listitem"><p>gcc-3.3.x: 102</p></li><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-5].x: 102 (when n=1)</p></li><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-5].x: 1000 + n (when n&gt;1) </p></li><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-5].x: 999999 (when n=0)</p></li></ul></div><p></p></li><li class="listitem"><p>Changes to the default compiler option for
140
    <code class="code">-fabi-version</code>.
141
    </p><p>
142
    It is versioned as follows:
143
    </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>gcc-3.0.x: (Error, not versioned) </p></li><li class="listitem"><p>gcc-3.1.x: (Error, not versioned) </p></li><li class="listitem"><p>gcc-3.2.x: <code class="code">-fabi-version=1</code></p></li><li class="listitem"><p>gcc-3.3.x: <code class="code">-fabi-version=1</code></p></li><li class="listitem"><p>gcc-3.4.x, gcc-4.[0-5].x: <code class="code">-fabi-version=2</code> <span class="emphasis"><em>(Incompatible with previous)</em></span></p></li></ul></div><p></p></li><li class="listitem"><p>Incremental bumping of a library pre-defined macro. For releases
144
    before 3.4.0, the macro is __GLIBCPP__. For later releases, it's
145
    __GLIBCXX__. (The libstdc++ project generously changed from CPP to
146
    CXX throughout its source to allow the "C" pre-processor the CPP
147
    macro namespace.) These macros are defined as the date the library
148
    was released, in compressed ISO date format, as an unsigned long.
149
    </p><p>
150
    This macro is defined in the file "c++config" in the
151
    "libstdc++/include/bits" directory. (Up to gcc-4.1.0, it was
152
    changed every night by an automated script. Since gcc-4.1.0, it is
153
    the same value as gcc/DATESTAMP.)
154
    </p><p>
155
    It is versioned as follows:
156
    </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>gcc-3.0.0: 20010615</p></li><li class="listitem"><p>gcc-3.0.1: 20010819</p></li><li class="listitem"><p>gcc-3.0.2: 20011023</p></li><li class="listitem"><p>gcc-3.0.3: 20011220</p></li><li class="listitem"><p>gcc-3.0.4: 20020220</p></li><li class="listitem"><p>gcc-3.1.0: 20020514</p></li><li class="listitem"><p>gcc-3.1.1: 20020725</p></li><li class="listitem"><p>gcc-3.2.0: 20020814</p></li><li class="listitem"><p>gcc-3.2.1: 20021119</p></li><li class="listitem"><p>gcc-3.2.2: 20030205</p></li><li class="listitem"><p>gcc-3.2.3: 20030422</p></li><li class="listitem"><p>gcc-3.3.0: 20030513</p></li><li class="listitem"><p>gcc-3.3.1: 20030804</p></li><li class="listitem"><p>gcc-3.3.2: 20031016</p></li><li class="listitem"><p>gcc-3.3.3: 20040214</p></li><li class="listitem"><p>gcc-3.4.0: 20040419</p></li><li class="listitem"><p>gcc-3.4.1: 20040701</p></li><li class="listitem"><p>gcc-3.4.2: 20040906</p></li><li class="listitem"><p>gcc-3.4.3: 20041105</p></li><li class="listitem"><p>gcc-3.4.4: 20050519</p></li><li class="listitem"><p>gcc-3.4.5: 20051201</p></li><li class="listitem"><p>gcc-3.4.6: 20060306</p></li><li class="listitem"><p>gcc-4.0.0: 20050421</p></li><li class="listitem"><p>gcc-4.0.1: 20050707</p></li><li class="listitem"><p>gcc-4.0.2: 20050921</p></li><li class="listitem"><p>gcc-4.0.3: 20060309</p></li><li class="listitem"><p>gcc-4.1.0: 20060228</p></li><li class="listitem"><p>gcc-4.1.1: 20060524</p></li><li class="listitem"><p>gcc-4.1.2: 20070214</p></li><li class="listitem"><p>gcc-4.2.0: 20070514</p></li><li class="listitem"><p>gcc-4.2.1: 20070719</p></li><li class="listitem"><p>gcc-4.2.2: 20071007</p></li><li class="listitem"><p>gcc-4.2.3: 20080201</p></li><li class="listitem"><p>gcc-4.2.4: 20080519</p></li><li class="listitem"><p>gcc-4.3.0: 20080306</p></li><li class="listitem"><p>gcc-4.3.1: 20080606</p></li><li class="listitem"><p>gcc-4.3.2: 20080827</p></li><li class="listitem"><p>gcc-4.3.3: 20090124</p></li><li class="listitem"><p>gcc-4.4.0: 20090421</p></li><li class="listitem"><p>gcc-4.4.1: 20090722</p></li><li class="listitem"><p>gcc-4.4.2: 20091015</p></li></ul></div><p></p></li><li class="listitem"><p>
157
    Incremental bumping of a library pre-defined macro,
158
    _GLIBCPP_VERSION. This macro is defined as the released version of
159
    the library, as a string literal. This is only implemented in
160
    gcc-3.1.0 releases and higher, and is deprecated in 3.4 (where it
161
    is called _GLIBCXX_VERSION).
162
    </p><p>
163
    This macro is defined in the file "c++config" in the
164
    "libstdc++/include/bits" directory and is generated
165
    automatically by autoconf as part of the configure-time generation
166
    of config.h.
167
    </p><p>
168
    It is versioned as follows:
169
    </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>gcc-3.0.0: "3.0.0"</p></li><li class="listitem"><p>gcc-3.0.1: "3.0.0" (Error, should be "3.0.1")</p></li><li class="listitem"><p>gcc-3.0.2: "3.0.0" (Error, should be "3.0.2")</p></li><li class="listitem"><p>gcc-3.0.3: "3.0.0" (Error, should be "3.0.3")</p></li><li class="listitem"><p>gcc-3.0.4: "3.0.0" (Error, should be "3.0.4")</p></li><li class="listitem"><p>gcc-3.1.0: "3.1.0"</p></li><li class="listitem"><p>gcc-3.1.1: "3.1.1"</p></li><li class="listitem"><p>gcc-3.2.0: "3.2"</p></li><li class="listitem"><p>gcc-3.2.1: "3.2.1"</p></li><li class="listitem"><p>gcc-3.2.2: "3.2.2"</p></li><li class="listitem"><p>gcc-3.2.3: "3.2.3"</p></li><li class="listitem"><p>gcc-3.3.0: "3.3"</p></li><li class="listitem"><p>gcc-3.3.1: "3.3.1"</p></li><li class="listitem"><p>gcc-3.3.2: "3.3.2"</p></li><li class="listitem"><p>gcc-3.3.3: "3.3.3"</p></li><li class="listitem"><p>gcc-3.4.x: "version-unused"</p></li><li class="listitem"><p>gcc-4.[0-5].x: "version-unused"</p></li></ul></div><p></p></li><li class="listitem"><p>
170
    Matching each specific C++ compiler release to a specific set of
171
    C++ include files. This is only implemented in gcc-3.1.1 releases
172
    and higher.
173
    </p><p>
174
    All C++ includes are installed in include/c++, then nest in a
175
    directory hierarchy corresponding to the C++ compiler's released
176
    version. This version corresponds to the variable "gcc_version" in
177
    "libstdc++/acinclude.m4," and more details can be found in that
178
    file's macro GLIBCXX_CONFIGURE (GLIBCPP_CONFIGURE before gcc-3.4.0).
179
    </p><p>
180
    C++ includes are versioned as follows:
181
    </p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>gcc-3.0.0: include/g++-v3</p></li><li class="listitem"><p>gcc-3.0.1: include/g++-v3</p></li><li class="listitem"><p>gcc-3.0.2: include/g++-v3</p></li><li class="listitem"><p>gcc-3.0.3: include/g++-v3</p></li><li class="listitem"><p>gcc-3.0.4: include/g++-v3</p></li><li class="listitem"><p>gcc-3.1.0: include/g++-v3</p></li><li class="listitem"><p>gcc-3.1.1: include/c++/3.1.1</p></li><li class="listitem"><p>gcc-3.2.0: include/c++/3.2</p></li><li class="listitem"><p>gcc-3.2.1: include/c++/3.2.1</p></li><li class="listitem"><p>gcc-3.2.2: include/c++/3.2.2</p></li><li class="listitem"><p>gcc-3.2.3: include/c++/3.2.3</p></li><li class="listitem"><p>gcc-3.3.0: include/c++/3.3</p></li><li class="listitem"><p>gcc-3.3.1: include/c++/3.3.1</p></li><li class="listitem"><p>gcc-3.3.2: include/c++/3.3.2</p></li><li class="listitem"><p>gcc-3.3.3: include/c++/3.3.3</p></li><li class="listitem"><p>gcc-3.4.0: include/c++/3.4.0</p></li><li class="listitem"><p>gcc-3.4.1: include/c++/3.4.1</p></li><li class="listitem"><p>gcc-3.4.2: include/c++/3.4.2</p></li><li class="listitem"><p>gcc-3.4.3: include/c++/3.4.3</p></li><li class="listitem"><p>gcc-3.4.4: include/c++/3.4.4</p></li><li class="listitem"><p>gcc-3.4.5: include/c++/3.4.5</p></li><li class="listitem"><p>gcc-3.4.6: include/c++/3.4.6</p></li><li class="listitem"><p>gcc-4.0.0: include/c++/4.0.0</p></li><li class="listitem"><p>gcc-4.0.1: include/c++/4.0.1</p></li><li class="listitem"><p>gcc-4.0.2: include/c++/4.0.2</p></li><li class="listitem"><p>gcc-4.0.3: include/c++/4.0.3</p></li><li class="listitem"><p>gcc-4.1.0: include/c++/4.1.0</p></li><li class="listitem"><p>gcc-4.1.1: include/c++/4.1.1</p></li><li class="listitem"><p>gcc-4.1.2: include/c++/4.1.2</p></li><li class="listitem"><p>gcc-4.2.0: include/c++/4.2.0</p></li><li class="listitem"><p>gcc-4.2.1: include/c++/4.2.1</p></li><li class="listitem"><p>gcc-4.2.2: include/c++/4.2.2</p></li><li class="listitem"><p>gcc-4.2.3: include/c++/4.2.3</p></li><li class="listitem"><p>gcc-4.2.4: include/c++/4.2.4</p></li><li class="listitem"><p>gcc-4.3.0: include/c++/4.3.0</p></li><li class="listitem"><p>gcc-4.3.1: include/c++/4.3.1</p></li><li class="listitem"><p>gcc-4.3.3: include/c++/4.3.3</p></li><li class="listitem"><p>gcc-4.3.4: include/c++/4.3.4</p></li><li class="listitem"><p>gcc-4.4.0: include/c++/4.4.0</p></li><li class="listitem"><p>gcc-4.4.1: include/c++/4.4.1</p></li><li class="listitem"><p>gcc-4.4.2: include/c++/4.4.2</p></li><li class="listitem"><p>gcc-4.5.0: include/c++/4.5.0</p></li></ul></div><p></p></li></ol></div><p>
182
  Taken together, these techniques can accurately specify interface
183
  and implementation changes in the GNU C++ tools themselves. Used
184
  properly, they allow both the GNU C++ tools implementation, and
185
  programs using them, an evolving yet controlled development that
186
  maintains backward compatibility.
187
</p></div><div class="sect3" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.prereq"></a>Prerequisites</h4></div></div></div><p>
188
      Minimum environment that supports a versioned ABI: A supported
189
      dynamic linker, a GNU linker of sufficient vintage to understand
190
      demangled C++ name globbing (ld), a shared executable compiled
191
      with g++, and shared libraries (libgcc_s, libstdc++) compiled by
192
      a compiler (g++) with a compatible ABI. Phew.
193
    </p><p>
194
      On top of all that, an additional constraint: libstdc++ did not
195
      attempt to version symbols (or age gracefully, really) until
196
      version 3.1.0.
197
    </p><p>
198
      Most modern Linux and BSD versions, particularly ones using
199
      gcc-3.1.x tools and more recent vintages, will meet the
200
      requirements above.
201
    </p></div><div class="sect3" title="Configuring"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.config"></a>Configuring</h4></div></div></div><p>
202
      It turns out that most of the configure options that change
203
      default behavior will impact the mangled names of exported
204
      symbols, and thus impact versioning and compatibility.
205
    </p><p>
206
      For more information on configure options, including ABI
207
      impacts, see:
208
      http://gcc.gnu.org/onlinedocs/libstdc++/configopts.html
209
    </p><p>
210
      There is one flag that explicitly deals with symbol versioning:
211
      --enable-symvers.
212
    </p><p>
213
      In particular, libstdc++/acinclude.m4 has a macro called
214
      GLIBCXX_ENABLE_SYMVERS that defaults to yes (or the argument
215
      passed in via --enable-symvers=foo). At that point, the macro
216
      attempts to make sure that all the requirement for symbol
217
      versioning are in place. For more information, please consult
218
      acinclude.m4.
219
    </p></div><div class="sect3" title="Checking Active"><div class="titlepage"><div><div><h4 class="title"><a id="abi.versioning.active"></a>Checking Active</h4></div></div></div><p>
220
      When the GNU C++ library is being built with symbol versioning
221
      on, you should see the following at configure time for
222
      libstdc++:
223
    </p><pre class="screen">
224
<code class="computeroutput">
225
  checking versioning on shared library symbols... gnu
226
</code>
227
</pre><p>
228
  If you don't see this line in the configure output, or if this line
229
  appears but the last word is 'no', then you are out of luck.
230
</p><p>
231
  If the compiler is pre-installed, a quick way to test is to compile
232
  the following (or any) simple C++ file and link it to the shared
233
  libstdc++ library:
234
</p><pre class="programlisting">
235
#include &lt;iostream&gt;
236
 
237
int main()
238
{ std::cout &lt;&lt; "hello" &lt;&lt; std::endl; return 0; }
239
 
240
%g++ hello.cc -o hello.out
241
 
242
%ldd hello.out
243
        libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x00764000)
244
        libm.so.6 =&gt; /lib/tls/libm.so.6 (0x004a8000)
245
        libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40016000)
246
        libc.so.6 =&gt; /lib/tls/libc.so.6 (0x0036d000)
247
        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
248
 
249
%nm hello.out
250
</pre><p>
251
If you see symbols in the resulting output with "GLIBCXX_3" as part
252
of the name, then the executable is versioned. Here's an example:
253
</p><p>
254
   <code class="code">U _ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4</code>
255
</p></div></div><div class="sect2" title="Allowed Changes"><div class="titlepage"><div><div><h3 class="title"><a id="abi.changes_allowed"></a>Allowed Changes</h3></div></div></div><p>
256
The following will cause the library minor version number to
257
increase, say from "libstdc++.so.3.0.4" to "libstdc++.so.3.0.5".
258
</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Adding an exported global or static data member</p></li><li class="listitem"><p>Adding an exported function, static or non-virtual member function</p></li><li class="listitem"><p>Adding an exported symbol or symbols by additional instantiations</p></li></ol></div><p>
259
Other allowed changes are possible.
260
</p></div><div class="sect2" title="Prohibited Changes"><div class="titlepage"><div><div><h3 class="title"><a id="abi.changes_no"></a>Prohibited Changes</h3></div></div></div><p>
261
The following non-exhaustive list will cause the library major version
262
number to increase, say from "libstdc++.so.3.0.4" to
263
"libstdc++.so.4.0.0".
264
</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Changes in the gcc/g++ compiler ABI</p></li><li class="listitem"><p>Changing size of an exported symbol</p></li><li class="listitem"><p>Changing alignment of an exported symbol</p></li><li class="listitem"><p>Changing the layout of an exported symbol</p></li><li class="listitem"><p>Changing mangling on an exported symbol</p></li><li class="listitem"><p>Deleting an exported symbol</p></li><li class="listitem"><p>Changing the inheritance properties of a type by adding or removing
265
    base classes</p></li><li class="listitem"><p>
266
  Changing the size, alignment, or layout of types
267
  specified in the C++ standard. These may not necessarily be
268
  instantiated or otherwise exported in the library binary, and
269
  include all the required locale facets, as well as things like
270
  std::basic_streambuf, et al.
271
</p></li><li class="listitem"><p> Adding an explicit copy constructor or destructor to a
272
class that would otherwise have implicit versions. This will change
273
the way the compiler deals with this class in by-value return
274
statements or parameters: instead of being passing instances of this
275
class in registers, the compiler will be forced to use memory. See <a class="ulink" href="http://www.codesourcery.com/cxx-abi/abi.html#calls" target="_top"> this part</a>
276
 of the C++ ABI documentation for further details.
277
 </p></li></ol></div></div><div class="sect2" title="Implementation"><div class="titlepage"><div><div><h3 class="title"><a id="abi.impl"></a>Implementation</h3></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
278
     Separation of interface and implementation
279
   </p><p>
280
     This is accomplished by two techniques that separate the API from
281
     the ABI: forcing undefined references to link against a library
282
     binary for definitions.
283
   </p><div class="variablelist"><dl><dt><span class="term">Include files have declarations, source files have defines</span></dt><dd><p>
284
        For non-templatized types, such as much of <code class="code">class
285
        locale</code>, the appropriate standard C++ include, say
286
        <code class="code">locale</code>, can contain full declarations, while
287
        various source files (say <code class="code"> locale.cc, locale_init.cc,
288
        localename.cc</code>) contain definitions.
289
      </p></dd><dt><span class="term">Extern template on required types</span></dt><dd><p>
290
       For parts of the standard that have an explicit list of
291
       required instantiations, the GNU extension syntax <code class="code"> extern
292
       template </code> can be used to control where template
293
       definitions reside. By marking required instantiations as
294
       <code class="code"> extern template </code> in include files, and providing
295
       explicit instantiations in the appropriate instantiation files,
296
       non-inlined template functions can be versioned. This technique
297
       is mostly used on parts of the standard that require <code class="code">
298
       char</code> and <code class="code"> wchar_t</code> instantiations, and
299
       includes <code class="code"> basic_string</code>, the locale facets, and the
300
       types in <code class="code"> iostreams</code>.
301
     </p></dd></dl></div><p>
302
   In addition, these techniques have the additional benefit that they
303
   reduce binary size, which can increase runtime performance.
304
 </p></li><li class="listitem"><p>
305
     Namespaces linking symbol definitions to export mapfiles
306
   </p><p>
307
     All symbols in the shared library binary are processed by a
308
     linker script at build time that either allows or disallows
309
     external linkage. Because of this, some symbols, regardless of
310
     normal C/C++ linkage, are not visible. Symbols that are internal
311
     have several appealing characteristics: by not exporting the
312
     symbols, there are no relocations when the shared library is
313
     started and thus this makes for faster runtime loading
314
     performance by the underlying dynamic loading mechanism. In
315
     addition, they have the possibility of changing without impacting
316
     ABI compatibility.
317
   </p><p>The following namespaces are transformed by the mapfile:</p><div class="variablelist"><dl><dt><span class="term"><code class="code">namespace std</code></span></dt><dd><p> Defaults to exporting all symbols in label
318
<code class="code">GLIBCXX</code> that do not begin with an underscore, i.e.,
319
<code class="code">__test_func</code> would not be exported by default. Select
320
exceptional symbols are allowed to be visible.</p></dd><dt><span class="term"><code class="code">namespace __gnu_cxx</code></span></dt><dd><p> Defaults to not exporting any symbols in label
321
<code class="code">GLIBCXX</code>, select items are allowed to be visible.</p></dd><dt><span class="term"><code class="code">namespace __gnu_internal</code></span></dt><dd><p> Defaults to not exported, no items are allowed to be visible.</p></dd><dt><span class="term"><code class="code">namespace __cxxabiv1</code>, aliased to <code class="code"> namespace abi</code></span></dt><dd><p> Defaults to not exporting any symbols in label
322
<code class="code">CXXABI</code>, select items are allowed to be visible.</p></dd></dl></div><p>
323
</p></li><li class="listitem"><p>Freezing the API</p><p>Disallowed changes, as above, are not made on a stable release
324
branch. Enforcement tends to be less strict with GNU extensions that
325
standard includes.</p></li></ol></div></div><div class="sect2" title="Testing"><div class="titlepage"><div><div><h3 class="title"><a id="abi.testing"></a>Testing</h3></div></div></div><div class="sect3" title="Single ABI Testing"><div class="titlepage"><div><div><h4 class="title"><a id="abi.testing.single"></a>Single ABI Testing</h4></div></div></div><p>
326
      Testing for GNU C++ ABI changes is composed of two distinct
327
      areas: testing the C++ compiler (g++) for compiler changes, and
328
      testing the C++ library (libstdc++) for library changes.
329
    </p><p>
330
      Testing the C++ compiler ABI can be done various ways.
331
    </p><p>
332
      One.  Intel ABI checker.
333
    </p><p>
334
Two.
335
The second is yet unreleased, but has been announced on the gcc
336
mailing list. It is yet unspecified if these tools will be freely
337
available, and able to be included in a GNU project. Please contact
338
Mark Mitchell (mark@codesourcery.com) for more details, and current
339
status.
340
</p><p>
341
Three.
342
Involves using the vlad.consistency test framework. This has also been
343
discussed on the gcc mailing lists.
344
</p><p>
345
Testing the C++ library ABI can also be done various ways.
346
</p><p>
347
One.
348
(Brendan Kehoe, Jeff Law suggestion to run 'make check-c++' two ways,
349
one with a new compiler and an old library, and the other with an old
350
compiler and a new library, and look for testsuite regressions)
351
</p><p>
352
Details on how to set this kind of test up can be found here:
353
http://gcc.gnu.org/ml/gcc/2002-08/msg00142.html
354
</p><p>
355
Two.
356
Use the 'make check-abi' rule in the libstdc++ Makefile.
357
</p><p>
358
This is a proactive check the library ABI. Currently, exported symbol
359
names that are either weak or defined are checked against a last known
360
good baseline. Currently, this baseline is keyed off of 3.4.0
361
binaries, as this was the last time the .so number was incremented. In
362
addition, all exported names are demangled, and the exported objects
363
are checked to make sure they are the same size as the same object in
364
the baseline.
365
 
366
Notice that each baseline is relative to a <span class="emphasis"><em>default</em></span>
367
configured library and compiler: in particular, if options such as
368
--enable-clocale, or --with-cpu, in case of multilibs, are used at
369
configure time, the check may fail, either because of substantive
370
differences or because of limitations of the current checking
371
machinery.
372
</p><p>
373
This dataset is insufficient, yet a start. Also needed is a
374
comprehensive check for all user-visible types part of the standard
375
library for sizeof() and alignof() changes.
376
</p><p>
377
Verifying compatible layouts of objects is not even attempted.  It
378
should be possible to use sizeof, alignof, and offsetof to compute
379
offsets for each structure and type in the standard library, saving to
380
another datafile. Then, compute this in a similar way for new
381
binaries, and look for differences.
382
</p><p>
383
Another approach might be to use the -fdump-class-hierarchy flag to
384
get information. However, currently this approach gives insufficient
385
data for use in library testing, as class data members, their offsets,
386
and other detailed data is not displayed with this flag.
387
(See g++/7470 on how this was used to find bugs.)
388
</p><p>
389
Perhaps there are other C++ ABI checkers. If so, please notify
390
us. We'd like to know about them!
391
</p></div><div class="sect3" title="Multiple ABI Testing"><div class="titlepage"><div><div><h4 class="title"><a id="abi.testing.multi"></a>Multiple ABI Testing</h4></div></div></div><p>
392
A "C" application, dynamically linked to two shared libraries, liba,
393
libb. The dependent library liba is C++ shared library compiled with
394
gcc-3.3.x, and uses io, exceptions, locale, etc. The dependent library
395
libb is a C++ shared library compiled with gcc-3.4.x, and also uses io,
396
exceptions, locale, etc.
397
</p><p> As above, libone is constructed as follows: </p><pre class="programlisting">
398
%$bld/H-x86-gcc-3.4.0/bin/g++ -fPIC -DPIC -c a.cc
399
 
400
%$bld/H-x86-gcc-3.4.0/bin/g++ -shared -Wl,-soname -Wl,libone.so.1 -Wl,-O1 -Wl,-z,defs a.o -o libone.so.1.0.0
401
 
402
%ln -s libone.so.1.0.0 libone.so
403
 
404
%$bld/H-x86-gcc-3.4.0/bin/g++ -c a.cc
405
 
406
%ar cru libone.a a.o
407
</pre><p> And, libtwo is constructed as follows: </p><pre class="programlisting">
408
%$bld/H-x86-gcc-3.3.3/bin/g++ -fPIC -DPIC -c b.cc
409
 
410
%$bld/H-x86-gcc-3.3.3/bin/g++ -shared -Wl,-soname -Wl,libtwo.so.1 -Wl,-O1 -Wl,-z,defs b.o -o libtwo.so.1.0.0
411
 
412
%ln -s libtwo.so.1.0.0 libtwo.so
413
 
414
%$bld/H-x86-gcc-3.3.3/bin/g++ -c b.cc
415
 
416
%ar cru libtwo.a b.o
417
</pre><p> ...with the resulting libraries looking like </p><pre class="screen">
418
<code class="computeroutput">
419
%ldd libone.so.1.0.0
420
        libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x40016000)
421
        libm.so.6 =&gt; /lib/tls/libm.so.6 (0x400fa000)
422
        libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x4011c000)
423
        libc.so.6 =&gt; /lib/tls/libc.so.6 (0x40125000)
424
        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
425
 
426
%ldd libtwo.so.1.0.0
427
        libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x40027000)
428
        libm.so.6 =&gt; /lib/tls/libm.so.6 (0x400e1000)
429
        libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x40103000)
430
        libc.so.6 =&gt; /lib/tls/libc.so.6 (0x4010c000)
431
        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
432
</code>
433
</pre><p>
434
  Then, the "C" compiler is used to compile a source file that uses
435
  functions from each library.
436
</p><pre class="programlisting">
437
gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so.6
438
</pre><p>
439
  Which gives the expected:
440
</p><pre class="screen">
441
<code class="computeroutput">
442
%ldd a.out
443
        libstdc++.so.5 =&gt; /usr/lib/libstdc++.so.5 (0x00764000)
444
        libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x40015000)
445
        libc.so.6 =&gt; /lib/tls/libc.so.6 (0x0036d000)
446
        libm.so.6 =&gt; /lib/tls/libm.so.6 (0x004a8000)
447
        libgcc_s.so.1 =&gt; /mnt/hd/bld/gcc/gcc/libgcc_s.so.1 (0x400e5000)
448
        /lib/ld-linux.so.2 =&gt; /lib/ld-linux.so.2 (0x00355000)
449
</code>
450
</pre><p>
451
  This resulting binary, when executed, will be able to safely use
452
  code from both liba, and the dependent libstdc++.so.6, and libb,
453
  with the dependent libstdc++.so.5.
454
</p></div></div><div class="sect2" title="Outstanding Issues"><div class="titlepage"><div><div><h3 class="title"><a id="abi.issues"></a>Outstanding Issues</h3></div></div></div><p>
455
  Some features in the C++ language make versioning especially
456
  difficult. In particular, compiler generated constructs such as
457
  implicit instantiations for templates, typeinfo information, and
458
  virtual tables all may cause ABI leakage across shared library
459
  boundaries. Because of this, mixing C++ ABIs is not recommended at
460
  this time.
461
</p><p>
462
  For more background on this issue, see these bugzilla entries:
463
</p><p>
464
<a class="ulink" href="http://gcc.gnu.org/PR24660" target="_top">24660: versioning weak symbols in libstdc++</a>
465
</p><p>
466
<a class="ulink" href="http://gcc.gnu.org/PR19664" target="_top">19664: libstdc++ headers should have pop/push of the visibility around the declarations</a>
467
</p></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"></a>Bibliography</h3></div></div></div><div class="biblioentry" title="ABIcheck, a vague idea of checking ABI compatibility"><a id="id725008"></a><p><span class="title"><i>
468
      ABIcheck, a vague idea of checking ABI compatibility
469
    </i>. </span><span class="biblioid">
470
      <a class="ulink" href="http://abicheck.sourceforge.net/" target="_top">
471
      </a>
472
    . </span></p></div><div class="biblioentry" title="C++ ABI Reference"><a id="id725026"></a><p><span class="title"><i>
473
      C++ ABI Reference
474
    </i>. </span><span class="biblioid">
475
      <a class="ulink" href="http://www.codesourcery.com/public/cxx-abi/" target="_top">
476
      </a>
477
    . </span></p></div><div class="biblioentry" title="Intel® Compilers for Linux* -Compatibility with the GNU Compilers"><a id="id725043"></a><p><span class="title"><i>
478
      Intel® Compilers for Linux* -Compatibility with the GNU Compilers
479
    </i>. </span><span class="biblioid">
480
      <a class="ulink" href="http://www.intel.com/cd/software/products/asmo-na/eng/284736.htm" target="_top">
481
      </a>
482
    . </span></p></div><div class="biblioentry" title="Sun Solaris 2.9 : Linker and Libraries Guide (document 816-1386)"><a id="id725060"></a><p><span class="title"><i>
483
      Sun Solaris 2.9 : Linker and Libraries Guide (document 816-1386)
484
    </i>. </span><span class="biblioid">
485
      <a class="ulink" href="http://docs.sun.com/app/docs/doc/817-1984" target="_top">
486
      </a>
487
    . </span></p></div><div class="biblioentry" title="Sun Solaris 2.9 : C++ Migration Guide (document 816-2459)"><a id="id725077"></a><p><span class="title"><i>
488
      Sun Solaris 2.9 : C++ Migration Guide (document 816-2459)
489
    </i>. </span><span class="biblioid">
490
      <a class="ulink" href="http://docs.sun.com/app/docs/doc/819-5266" target="_top">
491
      </a>
492
    . </span></p></div><div class="biblioentry" title="How to Write Shared Libraries"><a id="id725094"></a><p><span class="title"><i>
493
      How to Write Shared Libraries
494
    </i>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="biblioid">
495
      <a class="ulink" href="http://people.redhat.com/drepper/dsohowto.pdf" target="_top">
496
      </a>
497
    . </span></p></div><div class="biblioentry" title="C++ ABI for the ARM Architecture"><a id="id725122"></a><p><span class="title"><i>
498
      C++ ABI for the ARM Architecture
499
    </i>. </span><span class="biblioid">
500
      <a class="ulink" href="http://www.arm.com/miscPDFs/8033.pdf" target="_top">
501
      </a>
502
    . </span></p></div><div class="biblioentry" title="Dynamic Shared Objects: Survey and Issues"><a id="id651420"></a><p><span class="title"><i>
503
      Dynamic Shared Objects: Survey and Issues
504
    </i>. </span><span class="subtitle">
505
      ISO C++ J16/06-0046
506
    . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span><span class="biblioid">
507
      <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1976.html" target="_top">
508
      </a>
509
    . </span></p></div><div class="biblioentry" title="Versioning With Namespaces"><a id="id651453"></a><p><span class="title"><i>
510
      Versioning With Namespaces
511
    </i>. </span><span class="subtitle">
512
      ISO C++ J16/06-0083
513
    . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span><span class="biblioid">
514
      <a class="ulink" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2013.html" target="_top">
515
      </a>
516
    . </span></p></div><div class="biblioentry" title="Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems"><a id="id651486"></a><p><span class="title"><i>
517
      Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems
518
    </i>. </span><span class="subtitle">
519
SYRCoSE 2009
520
    . </span><span class="author"><span class="firstname">Pavel</span> <span class="surname">Shved</span>. </span><span class="author"><span class="firstname">Denis</span> <span class="surname">Silakov</span>. </span><span class="biblioid">
521
      <a class="ulink" href="http://syrcose.ispras.ru/2009/files/SYRCoSE2009-CfP.pdf" target="_top">
522
      </a>
523
    . </span></p></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="test.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Test </td><td width="20%" align="center"><a accesskey="h" href="../spine.html">Home</a></td><td width="40%" align="right" valign="top"> API Evolution and Deprecation History</td></tr></table></div></body></html>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.