From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: Flexible Linking for GCC? Date: Mon, 26 Jan 1998 09:19:51 +0100 Organization: Lehrstuhl fuer Stroemungsmechanik Message-ID: <34CC4727.3F1266C9@LSTM.Ruhr-UNI-Bochum.De> References: <34CAEB55 DOT 6CEC1041 AT thegrid DOT net> <6ah0i9$cgf$3 AT winter DOT news DOT erols DOT com> <34CC3F37 DOT 567B5178 AT thegrid DOT net> NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 43 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Eric Lange wrote: [...] > > > > Why would you want to do this? Only real reason I can think of for replacing > > the DJGPP startup code is so one could load some kind of virus-infested > > startup code in it's place..... > > I take some offense to that remark. I can think of several reasons why > someone would want to do that. In my case, I am developing a hardware > virtualizer for DOS to allow devices to be emulated in software. You may not be > aware, but this is not an easy task in an operating system that gives free reign > to the application. I have developed most of the core code, but I need some way > to develop (and allow others to develop) driver code, and I don't want to force > them to use assembly language. I have my own loader, I just need some way to > package the code in some other format than an .EXE. > > So there. Does anybody (else) have any ideas? Not really. I guess it is possible, look at the specs file and djgpp.djl. You also might have to change something in the BFD of ld, I am not sure about that. What you will definitely need is to convince MASM to produce COFF output. For changing the startup code, I think Bill Currie has written a bootstrap loader for djgpp programs, to boot an OS that is based on DJGPP. Though this is not what you want, I guess you can steal some good ideas from him ;-) Check the news archive on www.djgpp.com, and I think I have seen it on the djgpp/v2tk subdirectory. HTH -- Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************