Why is our symbol lookup the way it is?
Joerg Sonnenberger
joerg at britannica.bec.de
Wed Sep 7 08:26:25 PDT 2005
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
More information about the freebsd-hackers
mailing list