Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.unix-wizards Subject: Re: Wierd code Message-ID: <6103@utzoo.UUCP> Date: Wed, 30-Oct-85 20:30:14 EST Article-I.D.: utzoo.6103 Posted: Wed Oct 30 20:30:14 1985 Date-Received: Wed, 30-Oct-85 20:30:14 EST References: <2390@brl-tgr.ARPA> Organization: U of Toronto Zoology Lines: 29 > 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. Even > who loaders for the same microprocessor would therefore be substatnially > different if they had dissimilar memory schemes. 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. (It's been done, for a version of P695.) The loader doesn't have to know that 010537 means "mov r5, $#something", all it has to know is how it should adjust the number for relocation and linking. The variety of approaches to that is non-trivial, but much smaller. Even when one must cope with existing object-file formats which lack the needed flexibility, it is still silly to introduce gratuitous unportability into code which can be *mostly* machine-independent. (Reference: a draft of P695 was published in the August 1983 issue of IEEE Micro. See that for further information.) (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. The consensus was that investment in existing object-module formats is too heavy to expect changes. I still think that much could be accomplished in this direction if an influential standards body gave new Unix ports a firm push that way. Easier said than done, alas.) -- Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry