I have shared object A.so which statically links to libssl.a & another shared object B.so which also statically links libssl.a .
A.so & B.so has symbols from libssl.a in GLOBAL scope. I checked this by readelf -s A.so
I have an executable a.out which loads A.so and B.so. When a.out terminated I get a double free error in one of the symbols from libssl.a in A.so.
Even though libssl.a is statically linked to each shared object, since they are exposed globally is it possible that the same symbol is shared instead of picking it's local copy.
What is the workaround this ? How to make the symbols local here ?
Please help