Mail Archives: djgpp/2003/06/18/15:25:38
> I think ld intentionally leaves it zero, so you'd have to write your
> own program. Or you could modify djgpp's stubedit to do it :-)
I've made a basic stubedit program, but wondered how to
insert my own Optional header behind the COFF-header. If
there's aleady a AOUT header there, do I simply increase
the 'coff_hdr.f_opthdr' and 'coff_hdr.f_symptr' and stick my
own stubdata behind the original AOUT header?
Do I need some magic value to mark it as a non-AOUT
header? Here's what I understood about the layout so far:
EXE_header
_GO32_StubInfo <-- exe_start
_GO32_StubCode
FILHDR ; COFF header
AOUTHDR ; is this always here ?
I have some problems with the offset to the COFF-header.
Is it '512 * EXE_header.pages + EXE_header.length' ? Or always
at offset 0x800? What does the '_GO32_StubInfo.size = 84'
indicate?
--gv
- Raw text -