Cygport and auto-manifestize compatibility manifest
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Nov 21 15:30:00 GMT 2013
On Nov 21 09:27, Christopher Faylor wrote:
> On Thu, Nov 21, 2013 at 12:48:23PM +0100, Corinna Vinschen wrote:
> >I talked to collegues, and we're going to work on a patch to ld at some
> >point not too far in the distance. For the time being, we created a
> >workaround for ld using just a an additional cygwin-default-manifest.o
> >file in /usr/$(target)/lib, and a linker script tweak:
> >
> >@@ -143,7 +143,8 @@ SECTIONS
> > }
> > .rsrc BLOCK(__section_alignment__) :
> > {
> >- *(.rsrc)
> >+ *(EXCLUDE_FILE (cygwin-default-manifest.o) .rsrc)
> >+ KEEP (cygwin-default-manifest.o(.rsrc))
> > *(SORT(.rsrc$*))
> > }
> > .reloc BLOCK(__section_alignment__) :
>
> Shouldn't the KEEP line be after the SORT line?
I don't know. Right now this is probably entirely moot, because ld does
not correctly merge .rsrc sections anyway. The result will be, that
Windows will only recognize the first .rsrc section added to the
executable and then ignore anything beyond that because the rsrc header
will be incorrectly refer to only this first .rsrc blob. That's what
has to be fixed in ld.
For the time being, what happens with the above hack^Wpatch is the
following:
- If the project does not provide its own resources, the cygwin default
manifest resource will be linked into the executable and recognized by
Windows.
- If the project provides its own resources, they will be linked into
the executable first, followed by the cygwin default manifest resource.
Since the rsrc's are not correctly merged, only the project's own
resources will be found and the cygwin default manifest resource will
be hidden.
> If you send me a patch, I'll release new versions of binutils.
Oh, that's what I not have so far. It requires to add the
cygwin-default-manifest.rc file to binutils, and some changes to the
Makefiles to build and install cygwin-default-manifest.o. I don't know
how long this takes, I think either tomorrow or next Monday.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20131121/fb00ed62/attachment.sig>
More information about the Cygwin-apps
mailing list