This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Parallel installability of ABI incompatible C++ libraries


Hi,

I sent a variant of this email to fedora-devel a week ago, but got no
response. See what you guys think.

The ABI of a DSO which exports a C++ ABI == library ABI + compiler ABI

ELF soname versioning allows parallel installable library ABIs but does
nothing to address compiler ABIs. It would be convenient if the dynamic
linker had the following behaviour for libraries which link to libstdc++:

For each ELF object which has version reference of CXXABI_X.Y, when
resolving DT_NEEDED entries the linker searches each element in the search
path + /cxxabi-x.y first, then the element with no /cxxabi-x.y postfix.

This way, if you have a binary compiled with cxxabi 1.2 (gcc 3.2, 3.3) it
will be linked against libstdc++ with a version reference of CXXABI_1.2 so
eg, /usr/lib/cxxabi-1.2 will be checked first, then /usr/lib.

As an optimization, you could also invert it so the linker tries
/usr/lib/libfoo.so.0 first, then checks its CXXABI_X.Y entry and tests the
other directory only if the ABIs of the two libraries (as determined by
which version of libstdc++ they link against) are compatible.

This is not the cleanest possible solution, but it has the advantage of
working with binaries already compiled today.

Is this a good idea or a bad one? If it's a good idea, do you want me to
try writing the patch, or will somebody else do it? If it's a bad idea,
why?

thanks -mike


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]