Mail Archives: djgpp/1997/08/04/19:39:50
In article <33E4A623 DOT 3A94FC62 AT execulink DOT com>, Jeff Weeks
<pweeks AT execulink DOT com> scribbled :
>I need to know the size of the DJGPP stub plus the .EXE header. In most
>compilers, to get a flat binary file, you simply strip the first 512
>bytes (which would be the .EXE header) from the resultant executable.
>
>In DJGPP you can't do this though because of the stub (correct?), so I
>need to know the size of the stub, so that I can strip it from the
>executable to get a flat binary file.
>
DJGPP produces COFF files, which are executable on some Unices. Then it
adds a stub to load the COFF file and execute it in DOS.
The size of the stub, in bytes, is 2048 for DJGPP 2.00 (assemble
src/stub/stub.asm and DIR) - strip it and you have a flat binary.
Look at stubify.c and exe2coff.c, especially the latter.
- Raw text -