Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!rickert From: rickert@mp.cs.niu.edu (Neil Rickert) Newsgroups: comp.unix.internals Subject: Re: Shared Lib Question (ISC) Message-ID: <1991May15.232556.29031@mp.cs.niu.edu> Date: 15 May 91 23:25:56 GMT References: <19256@rpp386.cactus.org> <7516@segue.segue.com> <14213: May1522:13:2291@kramden.acf.nyu.edu> Organization: Northern Illinois University Lines: 33 In article <14213:May1522:13:2291@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >In article <7516@segue.segue.com> jim@segue.segue.com (Jim Balter) writes: >> So, one can >> implement the C library as a shared library without globals if one is willing >> to claim that the wrappers and the overhead they require isn't part of the >> implementation, but that is stretching it. > >Yeah. I've been arguing this with John via e-mail. He keeps repeating >the same old description of how to separate a library into a sharable >part and the part with the global variables. I keep pointing out that >the global variables are still there. We all know how to write a shared >library under the *constraint* of no static data, but the issue here is >whether that is a real constraint---i.e., whether good libraries can use >globals. John keeps ignoring the fact that malloc() does use globals. Why must you assume that a global variable must be static? Take a look at how IBM implemented a shared PL/I library in MVS. And don't bother to send me your flames that IBM stinks, or that MVS stinks, or that PL/I stinks, or even that the PL/I shared library stinks. It doesn't matter, and is not relevant. The fact is, the implementation manages to use pure code, but still use global variables. There is a register dedicated to carrying the data structure via which the global variables are accessed. Look at it this way - if you think IBM stinks, and PL/I stinks, then you should be able to do this even better with C and Unix. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science Northern Illinois Univ. DeKalb, IL 60115 +1-815-753-6940