Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!sri-spam!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!hp-pcd!hpcvlo!everett From: everett@hpcvlo.HP.COM (Everett Kaser) Newsgroups: comp.sys.ibm.pc Subject: Re: Format of EXE files Message-ID: <1610029@hpcvlo.HP.COM> Date: Wed, 12-Aug-87 16:54:29 EDT Article-I.D.: hpcvlo.1610029 Posted: Wed Aug 12 16:54:29 1987 Date-Received: Sun, 16-Aug-87 01:45:48 EDT References: <951@bsu-cs.UUCP> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 23 > from: dhesi@bsu-cs.UUCP (Rahul Dhesi) / 12:27 pm Aug 10, 1987 / > Every EXE file I have ever looked at had a bunch of null bytes between > the relocation table and the rest of the program. Typically it's over > 500 zero bytes. What are they used for? From the IBM DOS 2.0 manual, appendix H. EXE File Structure and Loading: "The .EXE files produced by the Linker program consist of two parts: - Control and relocation information - The load module itself The control and relocation information, which is described below, is at the beginning of the file in an area known as the header. the load module immediately follows the header. the load module BEGINS ON A SECTOR BOUNDARY and is the memory image of the module constructed by the linker." Caps are mine. In the IBM world of PC's, a sector is always 512 bytes, hence, in an .EXE file with only one or two relocatables, there will always be about 500 bytes of zeroes. Everett Kaser Hewlett-Packard Co. Corvallis, OR