Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon S. Allbery) Newsgroups: comp.os.minix Subject: Re: wierd problem building boot disk (bad magic number) Message-ID: <13289@ncoast.UUCP> Date: 26 Dec 88 00:38:39 GMT References: <3931@hubcap.UUCP> Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery) Followup-To: comp.os.minix Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 24 As quoted from <3931@hubcap.UUCP> by rwberry@hubcap.UUCP (Robert W Berry): +--------------- | Another quick question: why do you not have to link /usr/lib/head.s | into the kernel. I can understand bootblok.s not needing this header, | but why the kernel? Does it have anything to do with the entry point to | Minix being in assembler (mpx88.s?) +--------------- No, it has to do with the entry point to Minix not being entered *from* Minix. head.s under Minix, and crt0.s under Unix, construct C arrays from the argument and environment strings placed in the stack by exec, store a pointer to the environment array in the variable "environ", invoke the user's "main" with the argument and environment arrays as arguments, and perform an exit system call to return to the kernel. Since Minix is invoked as a standalone program, there are neither arguments nor environment to be munged and the only way to exit is to reboot or cycle power; thus, head.s is not needed. ++Brandon -- Brandon S. Allbery, comp.sources.misc moderator and one admin of ncoast PA UN*X uunet!hal.cwru.edu!ncoast!allbery ncoast!allbery@hal.cwru.edu comp.sources.misc is moving off ncoast -- please do NOT send submissions direct Send comp.sources.misc submissions to comp-sources-misc@.