dlsym(RTLD_NEXT) and weak symbols

Alexander Kabaev kabaev at gmail.com
Thu Oct 9 01:11:25 UTC 2008


On Wed, 08 Oct 2008 17:59:01 -0700
Maxim Sobolev <sobomax at FreeBSD.org> wrote:

> Alexander Kabaev wrote:
> > On Wed, 08 Oct 2008 15:33:41 -0700
> > Maxim Sobolev <sobomax at FreeBSD.org> wrote:
> >> The following patch fixes the issue for me:
> >>
> > <SKIP>
> > 
> > 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

Read the patch again please. You do not see where I am going :)

We need to grab first non-weak symbol that matches or first weak symbol
if no non-weak alternatives are found.
 

-- 
Alexander Kabaev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20081009/bec0310e/signature.pgp


More information about the freebsd-current mailing list