Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: a.out magic numbers (was Referencing through a null pointer) Message-ID: <1988May26.171814.811@utzoo.uucp> Organization: U of Toronto Zoology References: <3803@diku.dk> <1988May6.165741.633@utzoo.uucp>, <1806@cuuxb.ATT.COM> Date: Thu, 26 May 88 17:18:14 GMT > The magic number was used in the V6 and V7 bootstraps... > ...no unix program had the 407 in its address space... > I can't recall when Ken or Dennis said it stopped being > used in executables. I got private mail from DMR during the earlier discussion of this. He said, as I recall, that the 407 was in the address space in the very beginning of Unix on the 11. However, it vanished quite early, possibly at the time of the assembler-to-C rewrite. (He wasn't sure of the exact timing either.) It did linger for quite a while in bootstraps. > The bootstrap looked it its first word and if it was 407 then copied > itself over the a.out header... Not quite correct for V7, although it may have been for V6. The V7 boots check whether they are in low core, and copy themselves to high core if so. They do inspect the first word for a 407 first, but only to determine where the copying should start from (they skip the header if it's there). -- "For perfect safety... sit on a fence| Henry Spencer @ U of Toronto Zoology and watch the birds." --Wilbur Wright| {ihnp4,decvax,uunet!mnetor}!utzoo!henry