Date: Tue, 15 Nov 94 19:13:42 GMT From: dolan AT fnoc DOT navy DOT mil (Kent Dolan) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: scatter loading executables Subject: Re: Shared libraries Mailer: VM 5.32 (beta) for GNU Emacs 18.59.5 ??> Why not build something like that into DJGPP 2.0? Have the stub launch a ??> loader which exits after loading the libraries? DJ> There's still the problem of where to put the library. Most systems DJ> that support shared libraries can load the library at a predictable DJ> address, so that no relocation is needed. In DPMI 0.9, there is no DJ> way of doing this. > Dong Liu DL> The linux a.out shared libraries use fixed addresses, it is a pain to DL> make and maintain this kind libraries. It uses a specially hacked DL> version "as". With PIC code, it is much easier. Is it possible for two DL> tasks sharing pages in DJGPP 2.0? If it is, the dynamic loader and DL> shared libraries can be loaded in to memory by the first go32 program, DL> the spwaned task doesn't need to read them from disk again. That mus DL> save a lot of memory and time.(especially programs use libg++). Might be worth taking a look at how the Amiga does it. Code is compiled or assembled or whatever into "hunks" which are then scatter loaded into memory, I suppose with long jumps resolved at load time from one hunk to another. It wouldn't be that awful a thing, with virtual memory, to have a program loaded in dll hunks with holes between, if each hunk were built to start on a page boundary and unused holes took up no physical memory. You'd lose some memory to fragmentation, but gain the benefits of dll. The real stinger is that a benefit of dlls is supposed to be the ability to replace library elements without relinking the main program. If the linking of the main program has to know how much room to allow for each of the dll modules, this won't work any more. Xanthian. -- Kent, the man from xanth. Kent Paul Dolan, CSC contractor at Fleet Numerical. (408) 656-4363. (Navy Unix email: ) (Navy cc:Mail email: ) (real world email: )