Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.programmer Subject: Re: shared libraries, when to use them Keywords: shared libraries .so Message-ID: <8486@auspex.auspex.com> Date: 22 Jun 91 00:18:42 GMT References: <1991Jun11.163544.20234@aio.jsc.nasa.gov> <1991Jun18.050150.17149@thunder.mcrcim.mcgill.edu> <8448@auspex.auspex.com> Organization: Auspex Systems, Santa Clara Lines: 32 > >You can't, because SunOS doesn't have shared libraries. (What it does > >have is shared object files. What's the difference? You can link in > >part of a library without linking in the rest, among other things.) > >Just out of curiosity, who *has* implemented shared libraries? >("Multics" is, unless I misremember, not the correct answer.) I apologize for being too subtle. A number of people have sent me other incorrect answers; yes, I know, there are a number of OSes that have what der Mouse would call "shared object files", but I don't know of any that have what he'd call "shared libraries", the fact that others - including the vendors of those systems! - might call them shared libraries nonwithstanding. Apparently, the fact that I indicated that, as far as I know, Multics wasn't one of those systems was a bit too subtle a clue.... So who has implemented what der Mouse would call "shared libraries" - i.e., that let you "link in part of a library without linking in the rest", and that let multiple clients of the library share it? I assume, given that he said "SunOS doesn't have shared libraries", that the fact that some system might do demand paging and let only those pages of the shared object file containing code or data that's actually been used (and not had the page frame containing it be snatched for smething else) doesn't mean that system necessarily has shared libraries, as SunOS definitely demand-pages shared libraries. I.e., you have to be able to *link* in part of the library, not just be able to *page* in only part of the library even though the entire library (or its entire text) has been mapped into the address space of a process using the library. (No, I don't know what that would mean; that's one of the reasons why I'm asking the question....)