Article View: comp.sys.atari.st
Article #36132Re: Fast program loading with RELOC
From: Leo de Wit
Date: Tue, 24 Jan 1989 17:31
Date: Tue, 24 Jan 1989 17:31
30 lines
1885 bytes
1885 bytes
In article <80497@felix.UUCP> preston@felix.UUCP (Preston Bannister) writes:
|I found a very interesting utility on Genie called RELOC. What it does is
|modify a program's code file to make it self-relocating and then changes the
|codefile type so that TOS thinks the codefile is position-independent.
|
|What does this mean? This means that programs load _much_ faster, as TOS
|does not clear all of memory when a position-independent program is loaded.
|(Much the same effect as using NULLFILL).
|
|I've used it on the MWC compiler codefiles to cut several seconds off each
|compile. I've also used it on GULAM, MicroEmacs, and several other
|utilities with similar good results.
There is one little gotcha with programs marked 'position-independent':
the program file that was just read in, is left open. This is a bug in
the old Roms; it could well be solved in TOS 1.4. In practice this
means you can run about 43 of these programs, and then you're out of
file descriptors 8-(. Also when you try to run a non-program file (not
0x601a as the first word), GEMDOS correctly generates an error, but
leaves the file open.
And RELOC should better clear the BSS, or else your C programs will
break, 'cause GEMDOS does no clearing in this case (not explicitly
initialized global and static data must be initialized to all zero
bits; this is guaranteed by both K&R and the dpAns).
The idea of RELOC is however appealing; if only it would be able to
get rid of the open file descriptor...
Leo.
Technical Details
Message-ID:
<930@philmds.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!hp4nl!philmds!leoReferences:
<80497@felix.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.sys.atari.st Subject: Re: Fast program loading with RELOC Message-ID: <930@philmds.UUCP> Date: 24 Jan 89 17:31:05 GMT References: <80497@felix.UUCP> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 30