From owner-freebsd-current@FreeBSD.ORG Thu Oct 9 00:59:10 2008 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05F301065699; Thu, 9 Oct 2008 00:59:10 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id C2B2E8FC16; Thu, 9 Oct 2008 00:59:09 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.54.128] (S01060014bf8629c0.vc.shawcable.net [24.87.44.186]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id m990x79c009122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Oct 2008 17:59:08 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <48ED5755.3000601@FreeBSD.org> Date: Wed, 08 Oct 2008 17:59:01 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Alexander Kabaev References: <48ED27EA.9020407@FreeBSD.org> <48ED3545.6030609@FreeBSD.org> <20081008192905.0b75b0a6@kan.dnsalias.net> In-Reply-To: <20081008192905.0b75b0a6@kan.dnsalias.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Kabaev , "current@freebsd.org" Subject: Re: dlsym(RTLD_NEXT) and weak symbols X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2008 00:59:10 -0000 Alexander Kabaev wrote: > On Wed, 08 Oct 2008 15:33:41 -0700 > Maxim Sobolev wrote: >> The following patch fixes the issue for me: >> > > > I do not think your patch is completely correct. How about this one > instead: I see where you go, but I disagree. IMHO symbols in the ld-elf.so.1 should be searched even if there is no matching weak symbol found in other libraries. Technically, nothing says that the libc should have those weak symbols for dlopen and friends and also application can only be linked to ld-elf.so.1, not libc at all, and still dlsym("dlopen") should work. -Maxim