In Windows this is called "DLL hell". Too often the new version will have some subtle incompatibilities breaking a lot of stuff.
I am a fan of static linking or putting DLLs into a dedicated folder so these shared libraries are actually not shared.
The run-time libraries on top of this aren't part of the system. Each application brings its own and so of course hell will break loose if you mix and match.
Windows has no malloc or printf (not for public use anyway).
In the POSIX world, the user-space C run-time support is part of the platform so it is carefully versioned, just like kernel32.dll on Windows.
User space compiler run-time support isn't part of the platform on Windows; it is not that carefully versioned. Everyone is supposed to provide their own. If you have a compiler from Acme, Inc, you use the Acme C library with Acme malloc and Acme printf.
> putting DLLs into a dedicated folder
Which actually works on Windows, that's the thing.
Searching for shared libs in the same directory as the executable is very nice: like me.c finding its #include "me.h" next to it.
The Unix people didn't pay attention to their own programming language when they designed shared libs.
link /dump /exports c:\windows\system32\msvcrt.dll
Dump of file c:\windows\system32\msvcrt.dll
Section contains the following exports for msvcrt.dll
00000000 characteristics
57898F96 time date stamp Fri Jul 15 18:36:22 2016
0.00 version
1 ordinal base
1317 number of functions
1317 number of names
ordinal hint RVA name
....
1160 487 00019DE0 malloc
....
1183 49E 00048940 printfhttps://blogs.msdn.microsoft.com/oldnewthing/20140411-00/?p=...
But I've seen your trick used in lots of places, in a way that trick is a predecessor to containers, you isolate a functional unit and all dependencies somehow from the rest of the system.
There used to be such a thing as an optimizing linker that would throw out all library code that could not be reached.
Dynamic (with and without relocation) linking far predates the existence of glibc, much less Linux, by decades.
I'm trying to remember if the old mainframe I worked on had it but I'm not 100% sure.
I worked with a PDP/11 running Unix in the 80's and it definitely did not have dynamic linking. All the library files were simply linked to the executables and stripped of symbols before shipping to save space.
Anybody here have VAX 11/7XX experience? I wonder how it was on other DEC products.
We cannot expect organizations to be ready to rebuild tons of software, in a short time, every time there's a new vulnerability in a popular library like OpenSSL.