home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!darwin.sura.net!mips!swrinde!sdd.hp.com!usc!sol.ctr.columbia.edu!destroyer!terminator!sinshan.citi.umich.edu!sarr
- From: sarr@sinshan.citi.umich.edu (Sarr J. Blumson)
- Newsgroups: comp.arch
- Subject: Re: Jump tables for shared libraries
- Message-ID: <1992Jul30.163048.16476@terminator.cc.umich.edu>
- Date: 30 Jul 92 16:30:48 GMT
- References: <1992Jul30.151301.27595@crd.ge.com>
- Sender: news@terminator.cc.umich.edu (Usenet Owner)
- Organization: University of Michigan, CITI
- Lines: 39
-
- In article <1992Jul30.151301.27595@crd.ge.com> davidsen@crd.ge.com (bill davidsen) writes:
- >
- > A recent post to comp.os.linux indicated that there would be a change
- >to jump tables for the shared libraries in the next release. WHile I
- >understand the convenience features of jump tables, it would seem that
- >there would be a better way to avoid relinking programs, which would
- >avoid the overhaed of the indirection.
- >
- > Two thoughts come to mind. The first is to have some form of runtime
- >loader, which would do the linking at image activation time, rather than
- >at image store time. This would cause startup overhead, but would avoid
- >runtime overhead due to the indirect. The second would be to have the
- >jump table in unmapped memory, and have the o/s catch the call, modify
- >the image in memory to use the real address, and then restart the
- >program at the point of the call. This moves stuff down into the kernel,
- >and imposes a trap for each point in the image at which a library call
- >occurs.
- >
- Whether these are cost wins or loses depends on your model of program
- behavior. Both of these are expensive compared to a single
- indirection, so if the call is only going to be executed once (eg a
- traditional UNIX tool which does something simple and exits) or if the
- linking will have to be redone every time the code is paged out
- (because the code is in a nominally read only segment and so is reread
- on page in and never paged out) you might actually lose.
-
- > My personal preference is to not have the jump table, and if I have to
- >relink programs when I upgrade my library, so be it. It's not that big a
- >deal, and programs without source (not in the linux world) could be
- >distributed as archives of objects and linked by the end user. This can
- >be automated with a tiny shell script.
- >
- This requires either very sophisticated users or application programs
- that KNOW they are using shared libraries, which ones, and how to
- check whether they've been updated.
-
-
-
- (Sarr Blumson)
-