Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!mmdf From: mmdf@ee.udel.edu (The Mailer) Newsgroups: comp.os.minix Subject: Received: Message-ID: <39678@nigel.ee.udel.edu> Date: 20 Dec 90 10:41:39 GMT Organization: University of Delaware Lines: 48 from RL.IB by UK.AC.RL.IB (Mailer R2.07) with BSMTP id 8767; Thu, 20 Dec 90 10:10:49 GMT Via: UK.AC.EX; 20 DEC 90 10:10:06 GMT Date: Thu, 20 Dec 90 10:09:58 BST To: info-minix@udel.edu From: PILLAY.KDA%EXETER.AC.UK@pucc.princeton.edu Subject: Loader for 386 Minix Message-ID: > Date: Wed, 19 Dec 90 10:12:09 GMT > From: "Andrew G. Minter" > Subject: Re: Minix-386 : maximum size? > Sender: INFO-MINIX-ERRORS@EDU.NODAK.PLAINS ...... ...... > In the referenced article kevin@nuchat.UUCP (Kevin Brown) writes: >> What I REALLY want is a loader that does its thing in 386 mode so it can >> load the kernel anywhere in memory, not just in the first 640K. > I don't have enough knowledge about the deep and nasty internals of PC's to > write such such a beast, but it really is something that I would kill for > (or perhaps even pay money). If someone feels inclined to have ago they > will have my eternal gratitude. > Andrew I wrote a loader for MS-DOS .EXE files for 80x8/6 systems (PCs) which I subsequently used on a target 80186 system. You have to find out what format the relocatable binary code produced by the compiler/linker is stored as. In my case, it was the standard MS-DOS .EXE file structure. See my article 'Relocating Loader for MS-DOS .EXE executable files' in Microprocessors and Microsystems Vol 14, No 7, Sept 1990, pp 427-434. To have such a loader under Minix, you have to find out what the ACK compiler produces as relocatable code. The rest is pretty straight forward as all you do is extract the relocatable binary from the file, perform relocation (i.e. fix up the relocating items within the program) and then jump to the entry point of the fixed-up program. Good Loading. Ken. Email: pillay.kda@uk.ac.exeter (via EARN) OP