home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.arch:8463 comp.os.linux:7039
- Path: sparky!uunet!crdgw1!rdsunx.crd.ge.com!ariel!davidsen
- From: davidsen@ariel.crd.GE.COM (william E Davidsen)
- Newsgroups: comp.arch,comp.os.linux
- Subject: Jump tables for shared libraries
- Message-ID: <1992Jul30.151301.27595@crd.ge.com>
- Date: 30 Jul 92 15:13:01 GMT
- Sender: usenet@crd.ge.com (Required for NNTP)
- Reply-To: davidsen@crd.ge.com (bill davidsen)
- Followup-To: comp.arch
- Organization: GE Corporate R&D Center, Schenectady NY
- Lines: 37
- Nntp-Posting-Host: ariel.crd.ge.com
-
-
- 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.
-
- 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.
-
- Is there newer and/or better thinking on this problem? I estimated the
- overhead at up to 5%, and the original poster mentioned that he actually
- measured 2-4% on programs. While that makes me feel good about my
- estimating skills, I'm not overjoyed at the thought of a 2-4% drop in
- performance. Hopefully someone will suggest an alternative method which
- I can pass along for consideration.
-
- I x-posted this, follows are directed to comp.arch for any Linux-ers
- who want to follow it.
- --
- bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
- It never ceases to amaze me that otherwise rational people, able to
- understand calculus, compound interest, and the income tax form, can
- continue to believe that poker is a game of chance.
-