Bug in dlsym() (scope problem(?) & RTLD_NEXT problem)
Ulrich Drepper
drepper@cygnus.com
Wed Oct 7 17:21:00 GMT 1998
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 `------------------------
More information about the Libc-alpha
mailing list