This is the mail archive of the cygwin-apps mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygport and auto-manifestize compatibility manifest

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

- If the project does not provide its own resources, the cygwin default
  manifest resource will be linked into the executable and recognized by

- 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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpmKPR_wRWbB.pgp
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]