delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/06/11:39:01

From: Hans-Bernhard Broeker <broeker AT acp3bf DOT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Creating Libraries
Date: 6 Mar 2000 15:27:18 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 45
Distribution: world
Message-ID: <8a0iom$dio$1@nets3.rz.RWTH-Aachen.DE>
References: <89m8i7$2eb$1 AT news DOT maltanet DOT net> <200003041326 DOT SAA00765 AT midpec DOT com> <cov5cs4i931kh3shemv5lpt91j3f98o3go AT 4ax DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 952356438 13912 137.226.32.75 (6 Mar 2000 15:27:18 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 6 Mar 2000 15:27:18 GMT
User-Agent: tin/1.4-19991113 ("No Labels") (UNIX) (Linux/2.0.0 (i586))
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Damian Yerrick <DONT DOT YOU DOT DAREd_yerrick AT hotmail DOT comsend DOT spam> wrote:
> On Sat, 4 Mar 2000 18:26:19 +0500, Prashant TR <prashant_tr AT yahoo DOT com>
> wrote:

>>> I am new to DJGPP. In pascal wwe used to create overlays so one large
>>> program was split into smaller ones. How can I do the same in DJGPP.
>>
>>There's no need to create overlay files in DJGPP. In Turbo Pascal,
[...]
> But isn't DLX an overlaying package for when third parties need to
> supply overlays?

Not really. Overlaying is not equivalent to dynamically loaded object
files. There's quite a bit more to it, mainly background machinery,
and the ability to call any function of an overlayed program, from
every other one, regardless of wether they were in an overlay or not
(no direct calls from one overlay to the other, though, IIRC). DLX or
DLM, after quite some extension, would be usable as a basis to
implement overlaying on top of, but that's about it.

The full story:
---------------

The idea behind an overlayed program, back in the days of Borland's
16bit compilers (both Pascal and C), was that you just told the
compiler and linker by setting a flag you wished to create the
executable as an overlayed one. I.e. no(!) source code modification at
all.

It would then find suitably large, yet independent sections of the
executable, isolate functions needed by all or many of them, and
automatically split up the whole program into a central part, and a
series of overlays.  The real advantage over dynamically loaded
objects was that you did *not* have to bother about the organization
of when to load another overlay, in the program. The runtime library
did that, automatically, behind the scenes.

If not for the existence of overlays, ports of Unix programs like
'gnuplot' (500K of executable size) to PCs might have been outright
impossible, or at least a whole lot harder to do than they were, using
them.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019