From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 7 15:26:25 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CFB716A41F for ; Wed, 7 Sep 2005 15:26:25 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 324BE43D55 for ; Wed, 7 Sep 2005 15:26:23 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (unknown [139.30.252.72]) by hydra.bec.de (Postfix) with ESMTP id 1D4C635707 for ; Wed, 7 Sep 2005 17:26:22 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1001) id D9FA3104EC; Wed, 7 Sep 2005 17:25:23 +0200 (CEST) Date: Wed, 7 Sep 2005 17:25:22 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20050907152522.GA547@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <1126073204.18969.15.camel@shumai.marcuscom.com> <20050907113206.GA73920@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050907113206.GA73920@freefall.freebsd.org> User-Agent: Mutt/1.5.10i Subject: Re: Why is our symbol lookup the way it is? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2005 15:26:25 -0000 On Wed, Sep 07, 2005 at 11:32:06AM +0000, Alexander Kabaev wrote: > On Wed, Sep 07, 2005 at 02:06:44AM -0400, Joe Marcus Clarke wrote: > > This is something that's been bothering me for a while, ever since I > > fixed the symbol conflicts in Mozilla with -Bsymbolic. Why do we not > > look in the referencing object first by default? I'm referring to the > > great comments in the symlook_default() function in rtld.c. We only > > check the referencing object first when -Bsymbolic is passed to the > > linker. > > Number of reasons. Programs should be able to override symbols from > dynamim libraries, for instance. C++ exceptions won't work with -Bsymbolic > when exceptions are thrown across shared library boundaries, as thrower > and hander will use their own typeinfo structures and the catch clause > in handler block will simply not recognize the exception, etc. Even more simple, libc vs. libc_r / libkse / libpthread. Joerg