Date: Tue, 8 Jun 1999 11:59:13 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Brian Palmer cc: djgpp AT delorie DOT com Subject: Re: ld & flat binaries In-Reply-To: <375C62B6.95561B1F@sginet.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 7 Jun 1999, Brian Palmer wrote: > I am trying to make a flat binary with no stub or anything like that > using DJGPP. If you don't name a target that has a .exe suffix, GCC won't prepend a stub to it. Even if it does, EXE2COFF will remove it and leave you with a raw COFF executable. As for ``anything like that'', I don't know what else do you need to avoid in the ``flat binary''. Please elaborate. In general, DJGPP programs have some DPMI-specific stuff in the startup code as well, and if you don't want that, you will have to rewrite the crt0 code. > Also is there a way that I can put on my own stub? Latest versions of Binutils have an environment variable that you can point to your stub, and then that stub will be used. But I think you have a much more complex problem on your hands than just replacing the stub, if you want a boot loader, because at boot time none of the DPMI stuff works yet, and the startup code (not only the stub) depends on DPMI calls to set up the program for execution.