Current versions of binutils (2.10) can be configured to build pe images
on linux. Its not enabled by default (it has to be compiled in
separately, although hjl's binary releases for linux have this on, so
maybe redhat/debian/etc will as well), but would it be possible for this
to do what we want?

Just browsing the archives at sources.redhat.com/binutils, it appears
that there are still some bugs
(http://sources.redhat.com/ml/binutils/2000-07/msg00224.html). Does
anyone have any experience with this? I may be misunderstanding what its
doing (I haven't tried it), but a filename of pe-dll.c seems to hint
that ld can do something along these lines.

>From http://sources.redhat.com/ml/binutils/2000-07/msg00199.html:

> You can configure binutils from CVS or use my Linux binutils to link
> MS COFF .obj files under Linux as if they are the Linux native .o files.
> You should get a working Linux executable if the ABI is the same. I have
> verified that they work with asm code. The C code may work if the calling
> convention is the compatible. I don't think C++ code will work unless
> you put in some glues.
> 

I don't know enough about the details to see if this could end up
building dlls with the proper PE header easily, but I presume it would
be a good starting point.

The only problem is that this would force the use of the gnu binutils
(or at least a linker which can create pe images), which would be a
problem on solaris (and possible Be)

Bradley

Reply via email to