Shared Lib Question (ISC)

Neil Rickert rickert at mp.cs.niu.edu
Thu May 16 09:25:56 AEST 1991


In article <14213:May1522:13:2291 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
>In article <7516 at segue.segue.com> jim at 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               <rickert at cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940



More information about the Comp.unix.internals mailing list