From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28450 invoked by alias); 18 Jan 2013 15:34:38 -0000 Received: (qmail 28348 invoked by uid 22791); 18 Jan 2013 15:34:36 -0000 X-SWARE-Spam-Status: No, hits=-5.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_BJ,TW_JC,TW_YG X-Spam-Check-By: sourceware.org Received: from mail-qa0-f43.google.com (HELO mail-qa0-f43.google.com) (209.85.216.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Jan 2013 15:34:31 +0000 Received: by mail-qa0-f43.google.com with SMTP id cr7so5271249qab.2 for ; Fri, 18 Jan 2013 07:34:30 -0800 (PST) X-Received: by 10.224.179.75 with SMTP id bp11mr10034932qab.22.1358523270285; Fri, 18 Jan 2013 07:34:30 -0800 (PST) Received: from [172.21.193.109] (85-18-126-22.ip.fastwebnet.it. [85.18.126.22]) by mx.google.com with ESMTPS id i15sm3262266qah.21.2013.01.18.07.34.28 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jan 2013 07:34:29 -0800 (PST) Message-ID: <50F96B81.8090106@gmail.com> Date: Fri, 18 Jan 2013 15:34:00 -0000 From: marco atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Binutils objcopy bug (was Re: rebase segfault) References: <50F516C8.9050602@gmail.com> <20130115100745.GC2353@calimero.vinschen.de> <50F5312A.2040503@gmail.com> <20130115112406.GA13752@calimero.vinschen.de> <50F5D246.6010902@gmail.com> <50F653AB.80102@gmail.com> <20130116123509.GA16991@calimero.vinschen.de> In-Reply-To: <20130116123509.GA16991@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2013-01/txt/msg00268.txt.bz2 On 1/16/2013 1:35 PM, Corinna Vinschen wrote: > > As far as I can tell it's an objcopy bug. > > The stripped version of the DLL has a normal relocation information > which at one point ends in a NULL IMAGE_BASE_RELOCATION record, as > expected. After calling `objcopy --add-gnu-debuglink', the relocation > information is supposed to be the same as before, since the relocatable > file content didn't change. > > Nevertheless, when stepping through the relocator code in rebase, it > turns out that the former NULL IMAGE_BASE_RELOCATION record does not > contain only 0 values anymore. Rather, it has been overwritten with > some random(?) non-0 values, which rebase correctly interprets as the > start of the next IMAGE_BASE_RELOCATION array. So rebase blunders > along, thus either just SEGVing, if everything goes well, or, worst > case, overwriting formerly correct information in the file with > arbitrary data. > > This is a serious bug in objcopy in the current binutils. Given that > cygport creates the debug info automatically, we might end up with > spuriously broken DLLs in the distro. > > I checked with objcopy from the older binutils 2.51.53-2, and the > problem did not show up. I also built the latest binutils release > 2.23.1 and the problem also doesn't show, so we probably can get away > with just a black eye by updating binutils to 2.23.1. Chris? > > > Corinna > Chris, any news ? Marco -- 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