The Linker is not a Magical Program
Jeremie Pelletier
jeremiep at gmail.com
Thu Sep 3 14:42:40 PDT 2009
Walter Bright Wrote:
> A rant I wrote a few months ago:
>
> http://programmer.97things.oreilly.com/wiki/index.php/The_Linker_Is_not_a_Magical_Program
Great read, reminded me of my first weeks in C/C++ land, back when I couldn't tell the compiler from the linker :)
These days only the OMF format on Windows still seems magic because I can't find any decent documentation on its format. I had the hardest of times putting together a CodeView reader, finally got one working after consulting at least 10 different documents, looking at shitloads of codeview data in hex editors, and plenty of trial and error magic, and I still only support version 4.10, but I guess that makes me a magician!
Now if I only can find enough documentation about OMF to write a COFF to OMF converter.. there are still a bunch of libraries I use in C which I'd like to compile to static libraries in VC++ and link in DMD. I tried compiling with DMC to generate static OMF libraries directly, but they always fail on missing files like <xmmintrin.h> and other misc issues.
I also searched the web high and low for a coff2omf binary and only found one which generate broken libraries, dmd won't see any symbols in the converted files and the linker goes crazy on unresolved references. I tried link /CONVERT only to find out there is no /CONVERT option.
So yeah, the linker is not a magical program, but it does operate in a magical world.
More information about the Digitalmars-d
mailing list