From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31536 invoked by alias); 8 Mar 2005 17:13:48 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 31378 invoked from network); 8 Mar 2005 17:13:41 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 8 Mar 2005 17:13:41 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j28HDe8V022660 for ; Tue, 8 Mar 2005 12:13:40 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j28HDen28320; Tue, 8 Mar 2005 12:13:40 -0500 Received: from livre.redhat.lsd.ic.unicamp.br (vpn50-36.rdu.redhat.com [172.16.50.36]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id j28HDddW019479; Tue, 8 Mar 2005 12:13:39 -0500 Received: from livre.redhat.lsd.ic.unicamp.br (livre.redhat.lsd.ic.unicamp.br [127.0.0.1]) by livre.redhat.lsd.ic.unicamp.br (8.13.3/8.13.3) with ESMTP id j28HDboA028444; Tue, 8 Mar 2005 14:13:38 -0300 Received: (from aoliva@localhost) by livre.redhat.lsd.ic.unicamp.br (8.13.3/8.13.3/Submit) id j28HDW88028405; Tue, 8 Mar 2005 14:13:32 -0300 To: Zack Weinberg Cc: Mike Hearn , binutils@sources.redhat.com Subject: Re: --as-needed by default References: <20050303224413.GI376@bubble.modra.org> <87y8d4e1ru.fsf@codesourcery.com> From: Alexandre Oliva Organization: Red Hat Global Engineering Services Compiler Team Date: Tue, 08 Mar 2005 17:13:00 -0000 In-Reply-To: <87y8d4e1ru.fsf@codesourcery.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-03/txt/msg00226.txt.bz2 On Mar 3, 2005, Zack Weinberg wrote: > I've argued in the past for --as-needed to be the default, because it > makes shared library semantics match static library semantics, In what sense? I can come up with numerous examples in which it still wouldn't match. In fact, in *most* cases it still wouldn't match. I can't however figure out what particular example would make them match. > and because it takes a quite contrived application to depend on > DT_NEEDEDs for libraries that satisfy no symbols. Not really. Consider a library libfoo that is linked with libbar not because it uses symbols from libbar, but because libbar used to be part of its API before the code was split into a separate library. Dropping libbar from libfoo's DT_NEEDED would break programs linked with libfoo, and even force libfoo to change its SONAME. -- Alexandre Oliva http://www.ic.unicamp.br/~oliva/ Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org} Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}