Re:Linus Torvalds: Programs exist for their users
by evanlong on Friday March 09, 2012 @08:24PM
(#3686725)
One advantage to shared libs/dlls is that a security fix will be applied to all applications that depend on that. So if everyone statically links against insecure libA.a then all apps that depend on it need to ship a patch. Where as if libA is shipped as a shared library then one update needs to be applied. That's one advantage but maybe not the best.
Re:Linus Torvalds: Programs exist for their users
by im3w1l on Saturday March 10, 2012 @10:46PM
(#3689477)
What if we could have opportunistic dynamic linking, where an application uses a shared library, if present and compatible, and otherwise uses the bundled?
Seems to get the best of both worlds, no?
Re:Linus Torvalds: Programs exist for their users
by josephg on Friday March 09, 2012 @07:00PM
(#3686543)
Using shared libraries also decreases application startup time, because applications don't need to read as much code from disk.
Even using an SSD I suspect the difference would be noticable for most applications.
Speaking of that, I wonder if there's some point at which dynamic libraries don't really help you that much. These days, even shared libraries don't seem to stop a GNOME desktop running a browser from sucking down a gig of memory; would it really kill them to have a couple more megs of static library in each program? With copy-on-write, I think things like Chrome which spawn many children would come out pretty well.