This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: RFA: x86 backend: Add default-manifest to Cygwin/MinGW links


Hi Kai,

   The default manifest file contains a resource section (.rsrc) holding
   information necessary for the binary to be run under Windows 8.  It is
   placed last on the linker command line so that a user provided
   manifest, if there is one, will take precedence over the default
   manifest.

Well, I am a bit concerned about the position of the manifest-object.
What will actually happen, if user specifies an user-specific
manifest-object.  Will the default one, if present, be ignored, or
will it be still linked?

The default one, if present, will be ignored[1].

This is why I am using ENDFILE_SPEC to add the default manifest to the linker command line. This ensures that the default manifest is placed after any user specified object files on the linker command line. The resource merging code in the linker is specifically designed to drop any duplicate resources, only keeping the resource that appeared first on the command line.

Cheers
  Nick

[1] Strictly speaking the default manifest will not be ignored. It will be included in the link, and merged into the output .rsrc section. But the resource merging code in the linker will drop everything in the default manifest giving preference to the user supplied manifest instead.


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