Consider a scenario where there are two shared library of different version.Consider A.1.so linked to B.so and A.2.so linked to C.so. Now both B.so and C.so are linked to d.exe . When B.so wants to invoke function in A.1.so, it ends up calling function in A.2.so .Because of this , it gives us undefined behaviour.
Now I want my B.so invoke only A.1.so.I can only modify A.1.so and B.so , nothing else. Using dlopen()
is one of the option, but for using dlopen()
, I have to make heavy changes in B.so. There are many solutions given earlier in Stack Overflow, but nothing seems to work. Kindly note that I can make code changes in A.1.so and B.so only.
Is there any other solution to this problem other than dlopen()
. I have mentioned some of the links below.
- https://blog.habets.se/2012/05/Shared-libraries-diamond-problem.html
- https://code.woboq.org/qt5/qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h.html
- https://www.mailerq.com/blog/good-reasons-to-use-dlopen
- Loading multiple shared libraries with different versions
- Program use two conflicting shared libraries
- C++ two libraries depend on same lib but different versions?
- Linking with multiple versions of a library
- C++ two libraries depend on same lib but different versions?