Path: utzoo!mnetor!uunet!mcvax!diku!thorinn From: thorinn@diku.dk (Lars Henrik Mathiesen) Newsgroups: comp.lang.c Subject: Re: Re: Referencing through a null pointer Message-ID: <3803@diku.dk> Date: 5 May 88 11:33:46 GMT References: <4729@cup.portal.com>, <11199@mimsy.UUCP> <1988Apr25.230435.3434@utzoo.uucp> Organization: DIKU, U of Copenhagen, DK Lines: 19 In article <1988Apr25.230435.3434@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >> I imagine that PDP-11s without split I&D had *(char *)0 == 7 or 8, and >> *(short *)0 == 0407 or 0408 (OMAGIC and NMAGIC respectively). >Actually, no. The a.out header was not part of the actual core image, so >the first instruction of the program was first; Was this always so? In that case it is a striking coincidence that OMAGIC is the PDP-11 instruction to branch past the next 7 words -- which would be the rest of the a.out header. I think that this suggests that the whole a.out file was loaded in some early version of UNIX, with execution starting at 0. The rest of the a.out magic numbers may have been constructed by analogy in later versions of UNIX. >"Noalias must go. This is | Henry Spencer @ U of Toronto Zoology >non-negotiable." --DMR | {ihnp4,decvax,uunet!mnetor}!utzoo!henry -- Lars Mathiesen, DIKU, U of Copenhagen, Denmark [uunet!]mcvax!diku!thorinn Institute of Datalogy -- we're scientists, not engineers.