From owner-svn-src-projects@FreeBSD.ORG Tue Jan 11 11:58:27 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EBDB106564A; Tue, 11 Jan 2011 11:58:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2F0048FC0C; Tue, 11 Jan 2011 11:58:27 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:d1be:d464:96f6:3328] (unknown [IPv6:2001:7b8:3a7:0:d1be:d464:96f6:3328]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 5FD355C5A; Tue, 11 Jan 2011 12:58:26 +0100 (CET) Message-ID: <4D2C45EC.8080305@FreeBSD.org> Date: Tue, 11 Jan 2011 12:58:36 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.14pre) Gecko/20110109 Lanikai/3.1.8pre MIME-Version: 1.0 To: Kostik Belousov References: <201101111048.p0BAmowJ017937@svn.freebsd.org> <20110111114940.GG2518@deviant.kiev.zoral.com.ua> In-Reply-To: <20110111114940.GG2518@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r217260 - projects/binutils-2.17/contrib/binutils/ld/emultempl X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jan 2011 11:58:27 -0000 On 2011-01-11 12:49, Kostik Belousov wrote: >> - && ((iself&& sh_type == SHT_NOTE) >> - || (!iself&& CONST_STRNEQ (secname, ".note")))) >> + && CONST_STRNEQ (secname, ".note")) > I am not sure, but it looks likely that (iself&& sh_type == SHT_NOTE) > part of condition better be kept. Well, this specific test is what causes the .note section to end up somewhere else than behind .interp. I arrived at this by bisecting, but the precise mechanism behind this failure is not clear to me yet. For some reason, at that point, iself is always nonzero, but sh_type is *not* SHT_NOTE, even for .note sections. So then ld decides to put the .note section somewhere far down the list of sections, increasing the chance it will fall out of the first page of the executable. This particular test was changed to fix binutils PR ld/1467, in commit: http://sourceware.org/git/?p=binutils.git;a=commit;h=7f55fa5745fbe04b91e1fbd668d102f3166e03d8 However, the PR seems to be fixing a rather hypothetical situation, which we seem to have never encountered, as the 'issue' had always been in our binutils before.