From: "John S. Fine" Newsgroups: comp.os.msdos.djgpp Subject: Re: Pure binary output with GCC Date: Wed, 13 May 1998 11:36:08 -0400 Organization: Erol's Internet Services Lines: 29 Message-ID: <3559BDE8.E08@erols.com> References: Reply-To: johnfine AT erols DOT com NNTP-Posting-Host: 207-172-243-164.s37.as9.bsd.erols.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit CC: John Kismul To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Gurunandan R. Bhat wrote: > > > Is it possible to make GCC output pure binary files just like NASM does? > > To the best of knowlege, NASM outputs pure binary (I take it you mean > exe, right?) only for 16-bit code. DJGPP on the other hand is a 32-bit > programming platform. NASM outputs pure binary (.com format, not .exe format) whenever you tell it to. It does not care whether you include 16-bit code or 32-bit code. With DOS you can run a .COM file with 16 bit code. I don't know of any OS that will load a pure binary file with 32-bit code, but I will assume that that was what Gurunandan meant anyway and he has some purpose in mind for it. LD (the linker behind gcc) can be made to output a pure binary image. I have looked through its documentation and still couldn't begin to tell you how to do it. My zero-price linker JLOC can also produce a pure binary image from the .o files produced by djgpp. It is probably because I wrote it, but I think the JLOC documentation is a lot easier to follow for this purpose than the LD documentation. See my web page. -- http://www.erols.com/johnfine/ http://www.geocities.com/SiliconValley/Peaks/8600/