Shared libraries

Alex Goykhman goykhman_a at apollo.HP.COM
Fri May 3 02:09:00 AEST 1991


In article <19239 at rpp386.cactus.org> jfh at rpp386.cactus.org (John F Haugh II) writes:
>In article <148 at titccy.cc.titech.ac.jp> mohta at necom830.cc.titech.ac.jp (Masataka Ohta) writes:
>>UNIX was formed by intentionally removing many unnecessary features from
>>Multics and other huge OSs.
>
>The intention was to be simple and elegant, not spartan.  The solution
>to the shared library dilema is to find a simple and elegant implementation
>of shared libraries.  The problems I've always seen revolve about the
>data requirements of shared libraries.  I've always taken this to mean that
>the libraries were poorly designed, rather than that the concept of a shared
>library is flawed.
>-- 
>John F. Haugh II        | Distribution to  | UUCP: ...!cs.utexas.edu!rpp386!jfh
>Ma Bell: (512) 255-8251 | GEnie PROHIBITED :-) |  Domain: jfh at rpp386.cactus.org
>"If liberals interpreted the 2nd Amendment the same way they interpret the
> rest of the Constitution, gun ownership would be mandatory."


Come one, guys.  There is nothing special about a shared library.  Think
of it as a part of, or an extention to, the kernel.  A s.l. is just file
with a bunch of entry points.  All you need to do is to map it somewhere
in the virtual address space,  and trap every call to the s.l. entry
points, and substitute it with a call to the corresponding routine.

Mapping is trivial, trapping is machine-dependent, and you can't change it
anyway, so it must take a lot of imagination to produce an implementation
of shared libraries that would not be simple and elegant.






| Alex Goykhman                    goykhman_a at apollo.hp.com      |
| Chelmsford System Software Lab   mit-eddie!apollo!goykhman_a   |
| Hewlett-Packard, Company         I speak for myself            |
------------------------------------------------------------------



More information about the Comp.unix.internals mailing list