Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <436B65CC.8010705@byu.net> Date: Fri, 04 Nov 2005 06:44:44 -0700 From: Eric Blake User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: BUG: Binutils strip corrupts dll files when using cygwin 1.5.18 and latest snapshot (20051103) References: <20051104015144 DOT GI17650 AT trixie DOT casa DOT cgf DOT cx> <436B5771 DOT 1070202 AT byu DOT net> <20051104131115 DOT GA2858 AT calimero DOT vinschen DOT de> In-Reply-To: <20051104131115.GA2858@calimero.vinschen.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Corinna Vinschen on 11/4/2005 6:11 AM: > > The problem is that there's one section in the file, .gnu_debuglink, > which is defined as a debugging section. strip's job is to remove all > debug sections. This is usually a simple job to do since the debug > sections are typically at the end of the file anyway. Not so the > .gnu_debuglink section. By stripping this out, strip generates an > invalid PE/COFF file since it leaves an undefined memory hole in the > address space of the file, which is a no-no with the somewhat overly > simple Windows runtime loader. Wow. Learn something every day. No wonder ELF is so much more popular in the open source community. > > It's an unlucky case. You could argue that strip should know better > than to remove debug sections from the middle of a PE/COFF file but > OTOH the Cygwin DLL is a very special case. So the cygwin DLL is likely to be the only PE/COFF dll that strip ever encounters with a section marked as debug in the middle of a file? If it is ever expected that other DLLs will have the same property, then yes, strip should be taught to not strip intermediate debug sections; but if it is just cygwin1.dll, I can live with the rule of thumb of "don't do it if it hurts". - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDa2XM84KuGfSFAYARAv1EAJ4zk9aROsY6OxB4q6UdLwbAt1NJpwCgxNIY fKtZBAbvuCsGIJ1kBLX87f4= =Xxql -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/