| www.delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:message-id:date:from:mime-version:to:subject | |
| :content-type; q=dns; s=default; b=YTZEenJw806b6vAZWGXANYBwQ9GZI | |
| FGuIAUufsqYX5s3/q62dIgkUUnUJ5H7QsX4382BjmCZUyN8DVSWukFg0kbJ8KOXs | |
| x3VasnTSZd5lTwrgXXaWz9MkKom1Dm0nPO5WKtjeW/1+wqljN4Ul001Sl/WdZlRA | |
| szueG6EMXONuxY= | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:message-id:date:from:mime-version:to:subject | |
| :content-type; s=default; bh=zmpwlagwdNr2wobqXH2RGMnRnQs=; b=LNf | |
| 8su/eBEaEMsMgjMr+f1pXbd+3hPQNAbEePX1Qj7MNNYKvFn1sqgP+m68aLUsZLUP | |
| TlBURJgzppxWWUNxggQuejDsGYNcZDrplfFnxPf4NdWV6n+Y08NPmVCbBaeYDyyD | |
| euu+JO8Z7Wt4WG5+iEhegyYRdzD7DDluO9B1a4rI= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 |
| X-HELO: | limerock04.mail.cornell.edu |
| X-CornellRouted: | This message has been Routed already. |
| Message-ID: | <53456613.4090307@cornell.edu> |
| Date: | Wed, 09 Apr 2014 11:24:03 -0400 |
| From: | Ken Brown <kbrown AT cornell DOT edu> |
| User-Agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
| MIME-Version: | 1.0 |
| To: | cygwin <cygwin AT cygwin DOT com> |
| Subject: | Problem with default manifest when application provides its own |
| X-IsSubscribed: | yes |
--------------030201080402010403030209
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
I don't know if this report belongs here or if I should report a
binutils bug, but I'll start here.
When building emacs-w32.exe with the current binutils, I end up with an
executable that won't run after it's stripped (at least on x86_64). I
traced this to the fact that emacs-w32 comes with its own manifest. My
understanding is that the emacs-w32 manifest should take precedence over
the Cygwin default manifest, but something's going wrong in this case.
Here's a simple test case to illustrate the problem, using a slight
modification of the resource file that comes with emacs, and the
corresponding manifest (see attached).
$ windres -O coff emacs.rc -o emacs.res
$ cat test.c
int main()
{
return 0;
}
$ gcc -o test test.c -Wl,emacs.res
$ strip test.exe
$ ./test.exe
bash: ./test.exe: cannot execute binary file
The stripped binary has a messed up .rsrc section:
$ objdump -j .rsrc -s test.exe
test.exe: file format pei-x86-64
Contents of section .rsrc:
objdump: Reading section failed
Ken
--------------030201080402010403030209
Content-Type: text/plain; charset=windows-1252;
name="emacs.rc"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="emacs.rc"
1 24 "emacs-x64.manifest"
#ifndef VS_VERSION_INFO
#define VS_VERSION_INFO 1
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION 24,3,50,0
PRODUCTVERSION 24,3,50,0
FILEFLAGSMASK 0x3FL
#ifdef EMACSDEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "Free Software Foundation\0"
VALUE "FileDescription", "GNU Emacs: The extensible self-documenting text editor\0"
VALUE "FileVersion", "24, 3, 50, 0\0"
VALUE "InternalName", "Emacs\0"
VALUE "LegalCopyright", "Copyright (C) 2001-2014\0"
VALUE "OriginalFilename", "emacs.exe"
VALUE "ProductName", "Emacs\0"
VALUE "ProductVersion", "24, 3, 50, 0\0"
VALUE "OLESelfRegister", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
--------------030201080402010403030209
Content-Type: text/xml;
name="emacs-x64.manifest"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="emacs-x64.manifest"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls"
version="6.0.0.0" processorArchitecture="AMD64"
publicKeyToken="6595b64144ccf1df"
language="*"/>
</dependentAssembly>
</dependency>
<assemblyIdentity version="1.0.0.0" processorArchitecture="AMD64"
name="emacs" type="win32"/>
<description>GNU Emacs</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker"/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
</application>
</compatibility>
</assembly>
--------------030201080402010403030209
Content-Type: text/plain; charset=us-ascii
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
--------------030201080402010403030209--
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |