This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: Bug in dlsym() (scope problem(?) & RTLD_NEXT problem)
- To: Kars de Jong <jongk@cs.utwente.nl>
- Subject: Re: Bug in dlsym() (scope problem(?) & RTLD_NEXT problem)
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 07 Oct 1998 17:18:00 -0700
- Cc: libc-alpha@cygnus.com
- References: <98100716215100.00692@swi12>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
Kars de Jong <jongk@cs.utwente.nl> writes:
> The 2 printed pointers should not be the same. They are, however, for
> both methods. I tested this on a i586-pc-linux-gnu platform too.
> Fix:
> Nope, sorry. It might be due to the fact that write is a weak symbol
> in the C library. It would be best to use RTLD_NEXT anyway, to
> avoid version problems. But since that's broken as well...
The values for RTLD_NEXT are not the same with gilbc 2.1. There are
many known problems in glibc 2.0's ld.so which mostly will not be fixed.
I have to investigate how the dlopen() method finds the local
definition but I guess you are right it's because of write being weak
in libc. The question is: is this the right way? I would say yes
(i.e., no error), since dlsym should work the same way as an implicit
lookup through PLT would do it.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------