www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/13/16:38:59

From: "John S. Fine" <johnfine AT erols DOT com>
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: <Pine DOT LNX DOT 3 DOT 91 DOT 980512151113 DOT 2937C-100000 AT aditya DOT unigoa DOT ernet DOT in>
Reply-To: johnfine AT erols DOT com
NNTP-Posting-Host: 207-172-243-164.s37.as9.bsd.erols.com
Mime-Version: 1.0
CC: John Kismul <john DOT kismul AT bergen DOT mail DOT telia DOT com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019