From owner-freebsd-hackers Wed Feb 14 04:55:01 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA23004 for hackers-outgoing; Wed, 14 Feb 1996 04:55:01 -0800 (PST) Received: from time.cdrom.com (time.cdrom.com [192.216.222.226]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id EAA22992 for ; Wed, 14 Feb 1996 04:54:58 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by time.cdrom.com (8.6.12/8.6.9) with SMTP id EAA06750; Wed, 14 Feb 1996 04:49:26 -0800 To: Gianluca Dini cc: hackers@freebsd.org Subject: Re: shared libraries and dynamic linking In-reply-to: Your message of "Wed, 14 Feb 1996 10:14:05 +0100." <199602140914.KAA03848@dini.iet.unipi.it> Date: Wed, 14 Feb 1996 04:49:26 -0800 Message-ID: <6748.824302166@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-hackers@freebsd.org Precedence: bulk > i would like to use shared libraries and dynaminc linking under > freebsd as a case-study for students. unfortunately, the only > information that i've got so far is that reported by "man" that, > for this purpose, is insufficient. what i'm looking for is a > complete description about how they work and their > architecture. i'm not sure whether this is the right place to > make this request. Seriously, for what you wish to do there's really only one place to look: /usr/src/gnu/usr.bin/ld/ You should be able to study the operation of the linker in detail by running builds of some small shared library in /usr/src/lib with `cc -v' to show the calling sequence and flags, then trace through the source and see what it's actually doing. The runtime relocation done for shared executables can be similarly understood by reading through /usr/src/gnu/usr.bin/ld/rtld/ Good luck! Jordan