From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22981 invoked by alias); 2 Apr 2009 13:16:37 -0000 Received: (qmail 22666 invoked by uid 22791); 2 Apr 2009 13:16:34 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Apr 2009 13:16:28 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 6D80010A5E; Thu, 2 Apr 2009 13:16:26 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 5541D104E1; Thu, 2 Apr 2009 13:16:26 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1LpMmO-0004cz-Q1; Thu, 02 Apr 2009 09:16:24 -0400 Date: Thu, 02 Apr 2009 13:16:00 -0000 From: Daniel Jacobowitz To: Kazu Hirata , binutils@sourceware.org Subject: Re: [patch] ldfile.c: Fix the search path ordering for a linker script. Message-ID: <20090402131624.GA17756@caradoc.them.org> Mail-Followup-To: Kazu Hirata , binutils@sourceware.org References: <20090402025040.9486F6F62056@daisy.codesourcery.com> <20090402044927.GA15456@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090402044927.GA15456@bubble.grove.modra.org> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00065.txt.bz2 On Thu, Apr 02, 2009 at 03:19:27PM +1030, Alan Modra wrote: > On Wed, Apr 01, 2009 at 07:50:40PM -0700, Kazu Hirata wrote: > > http://sourceware.org/ml/binutils-cvs/2008-08/msg00062.html > > > > seems to have changed the search path ordering for a linker script in > > a way that contradicts what the ld documentation says. > > There was a reason why I chose that particular search order. Consider > the most common case, where someone invokes ld without giving a -T > or -dT option. If your copy of ld supports built-in scripts then for > the default target you'll always use one of the built-in scripts. If > ld doesn't support built-in scripts, then ld reads the script from > ldscripts/, which is usually installed in $prefix/lib/. Your change > could make ld choose some ldscripts/ other than the one installed > along with the ld binary. For instance, if I build and install a new > version of ld using a prefix of /usr/local, then I always want to use > scripts in /usr/local/lib/ldscripts/. I wouldn't want to pick up the > old system scripts in /usr/lib/ldscripts/ if -L /usr/lib happened to > be passed to ld! Actually, I think that would be a reasonable thing to do... anyway, can we treat the default linker scripts specially in this regard? For people with a customized linker script, having a copy of a system-wide installed script is quite common. -- Daniel Jacobowitz CodeSourcery