Originally posted by Weasel
View Post
You can have visual studio get creative and auto populate you manifest with unrequited version restrictions as well. Issue here is the linkers on Linux lack a good easy to use off switch to say yes I want this .so file but I don't want you to include version information on the symbols.
The dynamic loader only cares about symbol version if version information is in the program. Lot of glibc symbol not defined not that the glibc on the system does not have a suitable version of that symbol. But that there was some fault in that symbol that could cause a security issue and and it was revised slightly altering its operation. Like 99.9 percent of the time application not going to have a issue with the old buggy version of that symbol.
Originally posted by Weasel
View Post
A.so requires libstdc++ version A
B.so requires libstdc++ version B
You dlopen A.so version A libstdc++ is now loaded into link map.
you dlopen B.so it now gets version A libstdc++ and you application fails because B happened to be incompatible with version A of libstdc++.
This would not happen right if you use LoadLibrary right.
dlmopen give can use a different link map is totally not populated by anything.
You can read it here LM_ID_NEWLM
Read down and start cursing.
LD_AUDIT
There is a group of librarys loaded into its own NEWLM.
So for you application you can two link maps just using what the default loader provided. One problem fairly much totally disconnected from each other.
So yes glibc developers gave themselves means to run libraries to diagnostics in own link map. But then application developers were not given that feature as a link flag. The fact that the loader can do it for audit diagnostics means it not a ELF format problem. Its a loader implementation problem. Remember version on ELF symbols are a glibc extension. There is no reason why version information could not include this library should be loaded in own link map.
Loadlibrary is in fact like libcapsule. That is a unique link map per so/dll and common shared so/dlls. It shims provides a nice proxy for existing applications.
Remember issues libcapsule are fixing in dlmopen are really required before should expose option from loader because there are libraries that need to be shared when you split a library off into its own link map.
Originally posted by Weasel
View Post
One of the LSB developers did make a over wrapper for the glibc loader that provide this feature as well. But he got funding to do this work and he end up giving up on it. I am really thankful to valve for funding libcapsule this time around.
Audit interface is not fun for application developers to say the least. Its not that ELF format cannot have .so files loaded in different link maps. Its that the most common ELF loaders don't give you the feature for anything other than Audit.
LD_AUDIT libraries are loaded in to their unique link map by using dlmopen.
Comment