From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28868 invoked by alias); 16 Mar 2009 17:44:57 -0000 Received: (qmail 28856 invoked by uid 22791); 16 Mar 2009 17:44:54 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Mar 2009 17:44:38 +0000 Received: from zps75.corp.google.com (zps75.corp.google.com [172.25.146.75]) by smtp-out.google.com with ESMTP id n2GHiZWi019618; Mon, 16 Mar 2009 10:44:35 -0700 Received: from smtp.corp.google.com (spacemonkey1.corp.google.com [192.168.120.115]) by zps75.corp.google.com with ESMTP id n2GHiXDe001543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 16 Mar 2009 10:44:33 -0700 Received: from localhost.localdomain.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id n2GHiWAw026646 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 16 Mar 2009 09:44:33 -0800 To: Michael Hennebry Cc: binutils@sourceware.org Subject: Re: gold patch committed: Skip incompatible objects References: From: Ian Lance Taylor Date: Mon, 16 Mar 2009 17:44:00 -0000 In-Reply-To: (Michael Hennebry's message of "Mon\, 16 Mar 2009 10\:12\:30 -0500 \(CDT\)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true 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-03/txt/msg00299.txt.bz2 Michael Hennebry writes: > On Fri, 13 Mar 2009, Ian Lance Taylor wrote: > >> When the GNU linker searches for an input file or an archive, if it >> finds an incompatible file, it skips it and keeps searching. An object >> is incompatible if it is built for a target other than the one being >> linked. An archive is incompatible if it contains an incompatible >> object. A script is incompatible if it uses an OUTPUT_FORMAT command to >> name a target other than the one being linked. The GNU linker issues a >> warning when it skips a file, unless --no-warn-search-mismatch is used. > > IIRC linkers generally and GNU's in particular > *quietly* skip -L directories they can't find. > Usually that isn't too bad. > Sometimes it's the reason a failure to link is mysterious to me. > It would be nice if, at least in the case of a failure to link, > a failure to find a directory became noisy. It seems a little bit peculiar to me to go back and warn only after reporting some other error. The only time that an incorrect -L option would be a problem in this way would be if you have multiple libraries with the same name, and you are picking up the wrong one because a -L option was missed. That does not seem like a common case to me. I wouldn't object to optionally warning about missing -L directories, but I don't think it should be the default behaviour, and I doubt I will bother to write such a patch myself. Ian