Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!harpo!seismo!hao!hplabs!sri-unix!dan@bbncd From: dan@bbncd@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: Re: another argument against shared libraries Message-ID: <4147@sri-arpa.UUCP> Date: Fri, 12-Aug-83 12:52:28 EDT Article-I.D.: sri-arpa.4147 Posted: Fri Aug 12 12:52:28 1983 Date-Received: Sat, 13-Aug-83 23:32:21 EDT Lines: 41 From: Dan Franklin What people seem to forget is that shared libraries would be easier to change in EVERY way. With respect to changes that might introduce bugs, shared libraries are actually superior to regular libraries, especially if they are done with the flexibility of Multics-style dynamic linking. When you made a change to the library, you would first make the change in a private version of the library that only your own process tree would use. Now every UNIX command (that you run) will get tested with the new library--a fairly complete test! There would be no possibility of releasing a version of the library in which exec did not work; on the contrary, library changes would be tested far more thoroughly than they are now. Once you decided to release the library, you would again find any remaining bugs much faster than with the current system, because EVERYTHING would be using it. And as soon as users found a sufficiently bad bug, they would just switch to the older version of the library, which you have of course retained in a well-known place. Meanwhile, you go and fix the bug, and now again EVERYTHING is using the fixed version. Someone else brought up the matter of incompatible changes, e.g. to the printf format characters. This is not an argument against shared libraries, but an argument against shared anything, including kernels. You can't make an incompatible change to the kernel without providing some provision for older programs; you would have to be just as careful with shared libraries. And you should already be taking that care with libraries, so that a program doesn't break merely because it's reloaded. (And thus make you think that it was the change you made before you reloaded that caused the problem!) Incompatible changes can almost always be avoided (printf CAN interpret both character sequences), but when they must happen, you can just keep the old version around for awhile. If a program were sufficiently ancient, you would have to have the older version of the library resuscitated from backup tapes, just as you would have to do anyway as soon as someone tried to recompile it. If you haven't made any incompatible changes to the kernel which require the new library, it will work just fine. If you have, well, the shared libraries don't matter; the program would still be broken anyway. In short, shared libraries (properly implemented) would make changing the library routines an easier, safer task than they are now. Dan Franklin