Mail Archives: djgpp/2003/06/18/15:32:35
> I've made a basic stubedit program, but wondered how to insert my
> own Optional header behind the COFF-header.
You don't. The stub isn't smart enough to read the size field - it
expects a fixed size.
> 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?
The stub wouldn't be able to load it. Why can't you use the existing
timestamp and version fields?
> 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?
It's the math one, exept your math is wrong. See:
http://www.delorie.com/djgpp/doc/exe/
> What does the '_GO32_StubInfo.size = 84' indicate?
How much of the stub is the table at the beginning. That way, if we
add fields later, stubedit can determine what parts of the stub table
are changable.
- Raw text -