Wittams on Shared Libraries

Norman Hardy norm@netcom.com
Wed, 5 Jul 2000 18:30:46 -0700


At 12:13 -0400 00/07/05, Jonathan S. Shapiro wrote:
>This message bounced because it contained a majordomo command in the first
>five lines (majordomo is a pain in the butt this way). I'm forwarding it on
>behalf of Robert Wittams, who is the original author:
>
>It is definitely appropriate to eros-arch
>
>> [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!

>> 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!
>>
>>
>> 2. What is the planned scheme (if any) for distributed capabilities?
>> Is there a document describing how this could work anywhere?
>>
>>
>> Rob
>>

Norman Hardy  <http://www.mediacity.com/~norm>