[fpc-devel] Masm

Adriaan van Os fpc at microbizz.nl
Fri Nov 7 13:09:59 CET 2014

> But .... if the formats are the same, what is the cause of the error 
> message " Illegal COFF Magic" when trying to statically link with FPC a 
> VCC produced .obj or .lib ?

I found the COFF docs here <http://wiki.osdev.org/COFF> and here

the Visual C++ produced .obj has a header that starts with

	00 00 FF FF 01 00  4C 01 ....

The FPC .o has a header that starts with

	4C 01 ....

which indicates a standard COFF header (as checked by compiler/ogcoff.pas).

I can not make anything of the Visual C++ produced .obj with the Microsoft provides docs. If that 
isn't typically Microsoft ... How to corrupt any standard by "slightly modifying" it .... I will 
look further to dig up some meaningful info.


Adriaan van Os

More information about the fpc-devel mailing list