*BSD News Article 17439


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!caen!math.ohio-state.edu!howland.reston.ans.net!agate!soda.berkeley.edu!wjolitz
From: wjolitz@soda.berkeley.edu (William F. Jolitz)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: Catching References to address 0
Date: 23 Jun 1993 20:40:57 GMT
Organization: Computer Science Undergrad Assoc., UC Berkeley
Lines: 24
Message-ID: <20af4p$6b0@agate.berkeley.edu>
References: <1vid0k$p4n@agate.berkeley.edu> <1993Jun14.190638.424@e2big.mko.dec.com>
NNTP-Posting-Host: soda.berkeley.edu

In article <1993Jun14.190638.424@e2big.mko.dec.com> jtkohl@zk3.dec.com (John Kohl) writes:

> ...
>However, this way of unmapping page zero has the unfortunate side effect
>of consuming more disk space for the binaries (the .space 4096 ends up
>being useless bytes on the disk).  That's one advantage of the QMAGIC
>format:  since the a.out header is mapped into the address space,
>there's no one-page "gap" of worthless bytes on your executable image.

Sure. My point is that it's a special purpose item only. Until you can
come up with a excellent statement of the problem being solved (e.g.
general range and bounds checking on executables), I consider it only
special purpose. Note the MACH bumps a.out's up by 64K, and that iBCS2
suggests 4MB. No clear agreement yet.

>I don't have the time to work it out at the moment, but perhaps there's
>a way to arrange the loader and crt0 to unmap page zero, and not require
>wasted space in the on-disk executable format?

Yes you can. My point was that with a trivial change (2 lines), you can
accomplish the necessary end. BTW, you can also make self uncompressing
binaries as well ...

Bill.