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: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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 Subject: Problem with default manifest when application provides its own Content-Type: multipart/mixed; boundary="------------030201080402010403030209" 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" GNU Emacs --------------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--