To: linux-8086@vger.rutgers.edu (Linux-8086 List) Cc: linux-8086@vger.rutgers.edu From: "Eric J. Korpela" <korpela@ssl.Berkeley.EDU> Date: Sun, 13 Jul 1997 13:50:23 -0700 (PDT) Newsgroups: linux.dev.8086 > About those dynamic libs, couldn't we put some sort of tag in the binary, > placed by the compiler, telling the loader to load up to here, then, when > some interrupt or whatever is issued, load to the next tag, using the > same address space - voila, demand loading. I once implemented something similar to this by making the shared library calls into interrupts. The interrrupt handler kept track of what parts of the ``library'' were in memory, and which had been removed or paged to EMS. When a library was loaded (at program start), each routine in the library was assigned an ordinal number. A function call became an interrupt, with AX containing the ordinal number. The interrupt routine then made sure the routine was loaded and executed the proper function. There were some problems with this method. It greatly increased program startup time (as the functions were loaded the first time they were called). (Preloading libraries into EMS greatly alleviated this problem, as did increasing the minimum load size and properly sizing the spacing between the routines on disk). The calling convention is quite untradiational, too. (You'd need to rewrite your C compiler and "ld" to support it). Given what we were doing, the large code space was worth the effort. If we only could have done somthing similar for data space. (Well, we could have used an interrupt to access memory, but that seemed extreme. An ordinal number rather than a pointer for every data object? Pointer math would be crazy (at least crazier)) Eric
From Unofficial Linux-8086 Mailing List Archive (ULMLA)
Maintained by Robert
Robert's Mailing List Archive Page
Archive created with babymail