From: utzoo!decvax!duke!unc!mcnc!idis!george
Newsgroups: net.unix-wizards
Title: demand loading
Article-I.D.: idis.177
Posted: Mon Jan  3 02:22:35 1983
Received: Tue Jan  4 02:51:14 1983

This site has a VAX running 4.0 BSD with a 2K byte block size.
On this system demand load format is the default for "a.out" files.
In such files the first block contains an eight word (i.e. 32 byte) header.
The remainder of that block (i.e. 2016 bytes) is unused and contains zeros.
I suspect that this wastes considerable storage space along with
some processor and I/O time.

I do not know whether there are different more recent "a.out" formats.

I have a suggestion for a remedy.
I have only given it brief consideration, so comments and discussion
might be in order.
The remedy involves a new demand load format in "a.out" files
along with some corresponding kernel changes.

The first eight words of the file contain the standard header.
The ninth word will be discussed later.
The tenth word of the file contains the tenth word of the load image.
Succeeding words of the load image before "_etext" correspond
to succeeding words in the file.
The data segment follows normally.
The ninth word contains an offset in the file to a location somewhere
after the data segment image where the first nine words of the load
image can be found.

A copy of the first nine words of the executing image
could be stored in some convenient data structure.
Perhaps an enlarged "user" would due.


	George Rosenberg