I wrote a shared library with several incompatible versions. I changed SONAME, so they are called:
- lib_mylib.so.1.0.0 (older library)
- lib_mylib.so.2.0.0
Some functions exist only in mylib.so.1, others only in mylib.so.2, and many functions are common (but some of them have changed the number of arguments)
And I'm afraid that it is possible to link both versions of mylib in one application, for example, when the application itself is large and consists of many libraries. When the application is partially restored, the following situation may occur:
- Application
- app_lib1.so (was built with mylib.so.1 - the first version of my library)
- app_lib2.so (was rebuilt using mylib.so.2 - second version)
I already saw the application with two versions loaded into it ( ldd tells both).
So, is it possible to add a verification code to mylib.so.2 to find that there are both versions of an already loaded library, and they have conflicting ABI / Interface. (I cannot change lib_mylib.so.1 to add something to it)
source share