Shared Lib Question (ISC)

Masataka Ohta mohta at necom830.cc.titech.ac.jp
Fri May 10 17:19:26 AEST 1991


In article <19252 at rpp386.cactus.org>
	jfh at rpp386.cactus.org (John F Haugh II) writes:

>The trouble (as I see it) is that the C libraries were not
>designed well from the start.  The notion that there should
>never be global variables with all manner of hidden side
>effects was beaten into my brain as a CS undergrad.  Not to
>slight Ritchie, et al, but they appear not to have suffered
>the same violent abuse at the hands of their instructors ...

Consider an OS. It contains process private global variables, such as uid,
which has global hidden side effects.

As you know, UNIX libraries are well desined so that there is no distiction
between library calls and pure system calls.

A pure system call, one day, may be implemented as a complex library call
the other day.

Thus, it is natural that a library call have its own state, like a stdio
library.

>Were the code in the C library pure, shared libraries would
>be extremely simple to implement.  Data, which isn't sharable,
>is the worst of the flies in the ointment.

It is absurd to make C libraries complex only for the simple implementation
of shared library.

BTW, data for indirect jump to library routines is, anyway, not sharable.

						Masataka Ohta



More information about the Comp.unix.internals mailing list