Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: Shared Libraries Message-ID: <2653@auspex.auspex.com> Date: 21 Nov 89 19:27:50 GMT References: <656@augean.OZ> <2649@auspex.auspex.com> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 18 I went back and checked the paper "Shared Libraries in SunOS" in the Summer 1987 USENIX proceedings, which gives some details on how the SunOS 4.x shared library mechanism works. It's worth reading for anybody interested in SunOS 4.x or System V Release 4 dynamic linking. In particular, it answers a question about "ld.so" left unanswered by my previous posting: >It knows where "ld.so" lives, and how to map it in, etc.. It may assume >that "ld.so" is position-independent code, so that it doesn't have to >relocate it (it is position-independent code, but I don't remember any >more whether the "crt0" code could relocate it if it weren't); "ld.so" >contains enough code of its own so that it doesn't depend on "libc" or >anything like that. In fact, "ld.so" may require relocation, but only "very simple forms of relocation" that can be handled by a bootstrap routine in "ld.so" itself. The paper discusses this briefly in section 6.2 in which it describes how "ld.so" itself is built.