RE: Wittams on Shared Libraries Robert Wittams (robert.wittams@ic.ac.uk)
Thu, 6 Jul 2000 10:17:31 +0100

> >> [I am not sure if this should be on eros-arch or cap-talk]
> >>
> >> 1. How do shared libraries work?
> >> I presume they are a persistant address space that gets
> >> inserted into a domains address space, with a read only key.
> >> Then all unresolved symbols get resolved to the relevant address.
> >> What I am wondering is how does the key to that library address space
> >> get found.
>
> Just today I wrote a note on the overly complex Keykos binder at
> <http://www.mediacity.com/~norm/CapTheory/KK/Binder.html>.
> The note does not go far enogh to answer your question yet, however.
> In Keykos we composed the newly complied app code with whatever
> libraries were necessary as an integral part of compiling. This was
> natural because segments can share subsegments in Keykos and Eros.
> It also avoids the pitfal that Kragen mentioned in chroot. The builder
> of the app gets to choose the library, not merely its name!

Right. The only issue I have here is - how do you upgrade a shared lib without upgrading all the apps? (Ie rebinding their factories). In this case, you would need the old unbound binary still about.. and locatable by any package manager.

> >> I see two ways - there may be others...
> >> a) the keys to the libraries get placed into the program when it
> >> is "installed" in the system - either upon compilation, or from some
> >> kind of package
>
> good
>
> >> b) whenever a new copy of the program is made by the factory,
> >> it looks up the necessary keys from a namespace
>
> bad!

Thats what I thought ;-)