Path: utzoo!utgpu!water!watmath!clyde!ima!johnl From: johnl@ima.ima.isc.com (John R. Levine) Newsgroups: comp.sys.ibm.pc Subject: Re: Overlays & Function Pointers Message-ID: <2742@ima.ima.isc.com> Date: 6 Oct 88 03:47:52 GMT References: <542@optilink.UUCP> <2735@ima.ima.isc.com> <545@optilink.UUCP> Reply-To: johnl@ima.UUCP (John R. Levine) Organization: Not much Lines: 20 In article <545@optilink.UUCP> cramer@optilink.UUCP (Clayton Cramer) writes: >In article <2735@ima.ima.isc.com>, [I wrote]: >> Phoenix's PLINK linker has an overlay manager that works just fine when >> you call functions indirectly. ... >> It replaces references to a function's address by references >> to a thunk that makes sure the overlay is loaded, then jumps to the actual >> code. ... >... But there is a price -- doesn't every function end up >having a stub in the root, whether it is overlaid or not? No, PLINK is smart enough only to put in stubs for routines that are actually called from other overlays. In practice the cost appears to be small -- in a program with about 600K of executable code in over a dozen overlays the overlay table was less than 7K. The fact that Phoenix's debugger understands the overlays and lets you put breakpoints in overlays that aren't loaded yet is a help, too. -- John R. Levine, IECC, PO Box 349, Cambridge MA 02238-0349, +1 617 492 3869 { bbn | think | decvax | harvard | yale }!ima!johnl, Levine@YALE.something Rome fell, Babylon fell, Scarsdale will have its turn. -G. B. Shaw