On Sun, Jan 27, 2013 at 03:17:51PM +0000, David Chisnall wrote:
> On 27 Jan 2013, at 15:03, Konstantin Belousov wrote:
> 
> > On Sun, Jan 27, 2013 at 01:28:44PM +0000, David Chisnall wrote:
> >> +      std::set_new_handler*;
> > What are the symbols you assigning the version there ? I cannot find
> > anything in the libstdc++.so export list which would match the line.
> 
> std::set_new_handler(void (*)())
> 
> # objdump -T /usr/lib/libsupc++.so  | c++filt | grep new_h
> 0000000000009010 __float128    DF .text       000000000000000e  GLIBCXX_3.4 
> std::set_new_handler(void (*)())
Apparently c++filt from 2.23.1 binutils has bug, c++filt is
not able to demangle the set_new_handler.

> 
> >> +      std::set_terminate*;
> >> +      std::set_unexpected*;
> >> +      std::bad_alloc*;
> >> +
> >> +      std::bad_alloc*;
> > std::bad_alloc seems to be duplicated.
> 
> Thanks, removed.
> 
> > Besides that, pristine libstdc++.so exports 'std::bad_alloc::what() const'
> > at the GLIBCXX_3.4.9 namespace. You did this for the *::what()' from
> > libcxxrt but not for the libsupc++.
> 
> Ooops.  I wrote a script that checked for version mismatches, but for some 
> reason I missed this one.  Running it again, it shows two mismatches, both 
> fixed in the new version of the diff.
> 
You need to add 'std::bad_typeid::what() const' to 3.4.9 as well, it
seems.

> 
> >> +      std::bad_cast*;
> >> +      std::exception*;
> >> +
> >> +      "typeinfo for std::bad_alloc";
> >> +      "typeinfo for std::bad_cast";
> >> +      "typeinfo for std::exception";
> >> +
> >> +      "typeinfo name for std::bad_alloc";
> >> +      "typeinfo name for std::bad_cast";
> >> +      "typeinfo name for std::exception";
> >> +
> >> +      "vtable for std::bad_alloc";
> >> +      "vtable for std::bad_cast";
> >> +      "vtable for std::exception";
> >> +    };
> >> };
> >> 
> >> CXXABI_1.3.1 {
> >> Index: lib/libcxxrt/Version.map
> >> ===================================================================
> >> --- lib/libcxxrt/Version.map       (revision 245840)
> >> +++ lib/libcxxrt/Version.map       (working copy)
> >> @@ -209,18 +209,7 @@
> >> 
> >>         "std::type_info::type_info(std::type_info const&)";
> >>         "std::type_info::type_info(std::type_info const&)";
> >> -        "std::type_info::~type_info()";
> >> -        "std::type_info::~type_info()";
> >> -        "std::type_info::~type_info()";
> >>         "std::type_info::operator=(std::type_info const&)";
> > [omitted]
> > 
> > Do applications record the dependency on the libcxxrt directly,
> > using the DT_NEEDED tag ?
> 
> I don't believe so, they get it indirectly via libc++ or libstdc++.  How can 
> I check?
> 

Do readelf -d <some binary> and look for the needed tags. If libcxxrt
is not passed on the linker command line and not recorded as needed
in the libc++/libstdc++, it should be fine.

Your changes to libcxxrt obviously break the ABI, removing the symbols
from the version namespace, but my hope is that namespace for libcxxrt
is actually not part of the _system_ ABI. Thus the question.

Attachment: pgp98rtdFNHEi.pgp
Description: PGP signature

Reply via email to