This is the mail archive of the
mailing list for the binutils project.
Run with 2 different DSO versions
- From: Vladimir Simonov <sv at sw dot ru>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-help at gcc dot gnu dot org, binutils <binutils at sourceware dot org>
- Date: Thu, 29 Sep 2011 17:06:49 +0400
- Subject: Run with 2 different DSO versions
- References: <4DD2993D.firstname.lastname@example.org> <email@example.com> <4DD2A470.firstname.lastname@example.org>
Could you recommend something to solve the following problem?
1. Application is dynamically linked with COMMON_DSO_V2 and THIRD_PARTY_DSO.
2. COMMON_DSO_V2 is dynamically linked with COMMON_SUPP_DSO_V2.
3. THIRD_PARTY_DSO is dynamically linked with COMMON_DSO_V1 and
COMMON_SUPP_DSO_V1. All (three) of them are available in binary form only.
4. Source code of App, COMMON_DSO_V2 and COMMON_SUPP_DSO_V2 is available.
5. Because all COMMON_* DSOs have different sonames, all of them are loaded
at runtime. DSOs sonames:
COMMON_DSO_V2 - COMMON_DSO_V2;
COMMON_SUPP_DSO_V2 - COMMON_SUPP_DSO_V2;
COMMON_DSO_V1 - COMMON_DSO (no version in soname);
COMMON_SUPP_DSO_V1 - COMMON_SUPP_DSO (no version in soname);
6. Because DSOs COMMON_DSO_V1 and COMMON_DSO_V2(COMMON_SUPP_DSO_V1
and COMMON_SUPP_DSO_V2) in fact are just different versions of the same
library they have(export) lots of symbols with equal names. As
result App crashes with stack
App -> THIRD_PARTY_DSO -> COMMON_DSO_V1 -> COMMON_SUPP_DSO_V2 -> crash.
I'm looking for the best(simplest) way to resolve symbols names conflict.
As I know COMMON_* DSOs do not use any system-wide resources so their
different versions should coexist without problems if I eliminate conflict of names.
The most obvious way - to mangle somehow all symbols names in COMMON_DSO_V2 and
COMMON_SUPP_DSO_V2 in their headers and sources, but there are too many of them...
Hope some binutils/gcc/ld-linux magic may help with the issue.
Thank you in advance