mingw binaries and resources

Dave Korn dave.korn.cygwin@googlemail.com
Mon Aug 24 23:37:00 GMT 2009


Daniel Jacobowitz wrote:
> Is "i686-mingw32-ld.exe resource.o binary.exe -o new-binary.exe"
> generally supposed to work?

  Difficult question to answer.  "Supposed" by who?  It's not like we have a
detailed requirements doc to work to!  I suppose if MSVC LINK.EXE was capable
of operating like this, and users were in the habit of using it that way, we
could say that we have a requirement to do the same range of things that the
native tools do in a reasonably similar fashion.  But most of the advice I
could find in MSDN was about how to click the right menu option in your IDE to
add a manifest file to the project.

  The page that I did find that advised how to include manifests in an
NMAKE-based project(*) doesn't suggest using the linker but a dedicated
utility "mt.exe"(**) that embeds a manifest in an executable.  So I think we
either need to make ld work, or supply a GNU equivalent of mt.

> But then on some other binaries, it didn't work at all, on either side
> of the patch.
> 
> So before we start throwing testcases around, is passing a fully
> linked PE executable to LD supposed to work for adding resources?

  Dunno.  But why don't we see if we can't make it work?  Throw away!

    cheers,
      DaveK
-- 
(*)  - http://msdn.microsoft.com/en-us/library/ms235591(VS.80).aspx
(**) - http://msdn.microsoft.com/en-us/library/aa375649(VS.85).aspx



More information about the Binutils mailing list