Mail Archives: djgpp/1999/06/08/08:12:55
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.
- Raw text -