Wierd code

Bob Dalgleish bobd at zaphod.UUCP
Thu Nov 14 03:53:15 AEST 1985


In article <6103 at utzoo.UUCP> henry at utzoo.UUCP (Henry Spencer) writes:
>> An #ifdef VAX would be superfluous here.  The loader is one of the more
>> machine dependant parts of any system.  Not only does it depend on the
>> format of your relocatable files, but it depends on both the hardware
>> instruction set and the memorym management system being employed.
>
>Actually, by using a reasonably powerful and flexible object-module format,
>like the IEEE P695 proposal, it is quite possible to build a machine-
>independent loader.
>
>(Oh yes, to head off anyone suggesting that the /usr/group / IEEE Unix
>standards effort should have had P695 brought to its attention:  I did.
>				Henry Spencer @ U of Toronto Zoology
>				{allegra,ihnp4,linus,decvax}!utzoo!henry

We have had some experience with a P695 (MUFOM) linker:
	1) It is machine independent.  The same loader is used for
	   Z8000, Z80, and Z800 code.
	2) It is very inefficient, and not particularly the programs
	   fault.
Point (1) is very useful to us, since we deal with a non-trivial number
of processors.  Point (2) arises because the standard itself is
inefficient.  For example, to produce a namelist (i.e., 'nm(1)'), a
program has to read and examine the *entire file* - 40% of the file can
be skipped over, 3 to 100 bytes at a time.  The 'size(1)' command has
the same problem, since the size of the file is the sum of the load
blocks that make up the file.

These examples of course could be fixed up, of course, by conventionally
putting this information near the front of the file in comments.
*However*, it is only a convention and will not work since it is not
standard.

For those who are preparing to hit the 'F'lame key about efficiency:
Imagine waiting 40 minutes on a VAX11-780 for a load to happen when it
could have been done in under 5 minutes using a conventional architecture
loader.
-- 
[Forgive me, Father, for I have signed ...]

Bob Dalgleish		...!alberta!sask!zaphod!bobd
			      ihnp4!
(My company has disclaimed any knowledge of me and whatever I might say)



More information about the Comp.unix.wizards mailing list