Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!pt.cs.cmu.edu!sei.cmu.edu!firth From: firth@sei.cmu.edu (Robert Firth) Newsgroups: comp.arch Subject: Re: implementing shared libraries Message-ID: <926@aw.sei.cmu.edu.sei.cmu.edu> Date: Mon, 13-Apr-87 09:33:06 EST Article-I.D.: aw.926 Posted: Mon Apr 13 09:33:06 1987 Date-Received: Sun, 19-Apr-87 09:44:04 EST References: <12823@watnot.UUCP> Sender: netnews@sei.cmu.edu Reply-To: firth@bd.sei.cmu.edu.UUCP (Robert Firth) Distribution: comp Organization: Carnegie-Mellon University, SEI, Pgh, Pa Lines: 20 In article <12823@watnot.UUCP> ccplumb@watnot.UUCP (Colin Plumb) writes: >In comp.sys.amiga, there's a discussion going on about adding MMU's to >the machine. One problem is the Amiga's use of (shared) libraries. > >How are they handled on machines with address translation? Do they just >have to be written relocatable, or are assignments to virtual memory slots >done at compile time (yuk), or is there some other technique for fitting >them into the address spaces of various processes? > >If it helps, the Amiga uses an `openlibrary' call which returns a pointer >to a table of pointers to library routines. Routines are located at known >offsets. Far and away the simplest way is for the compiler to generate Position Independent Code. The libraries can then reside at any place in the process' virtual address space. They need not be at the same place in all processes. Your tame compiler writer should understand the principles of PIC and the ways to achieve it. If not, mail me.