From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57657 invoked by alias); 29 Jan 2018 08:58:47 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 51722 invoked by uid 89); 29 Jan 2018 08:58:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=offer X-HELO: mx1.redhat.com Subject: Re: Symbol versioning for secondary libraries is not effective To: Joseph Myers Cc: GNU C Library References: <68991e3f-89e0-5c98-8afa-593c49417510@redhat.com> From: Florian Weimer Message-ID: <26f4b544-d00e-adef-a31a-3b34eeae96ee@redhat.com> Date: Mon, 29 Jan 2018 14:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-01/txt/msg01057.txt.bz2 On 01/26/2018 01:46 PM, Joseph Myers wrote: > On Fri, 26 Jan 2018, Florian Weimer wrote: > >> in mind for future changes. It is also a mild argument in favor of moving >> symbols into libc.so.6, I think. > > Suppose you make the libc.so linker script reference some or all of the > other libraries inside AS_NEEDED. Do that result in them being > automatically linked into shared libraries that use symbols from them, or > does it only work for executables? This will not work for libpthread because some libraries really prefer to link against the libc.so.6 definitions, at least for the time being, where the libc and libpthread implementations offer different trade-offs. For libm and libld, this approach appears to work. The AS_NEEDED directive is even overriden by an explicit -lm or -ldl on the command, which is good. It looks like this is something to consider for the next release. > Referencing libraries inside AS_NEEDED is arguably friendlier to users > anyway - e.g. those not familiar with Unix conventions may not expect to > need to use -lm. Yes, a missing -lm seems to be a common obstacle. Thanks, Florian