dlsym(RTLD_NEXT) and weak symbols
- From: Maxim Sobolev <sobomax@xxxxxxxxxxx>
- Date: Wed, 08 Oct 2008 14:36:42 -0700
Hi,
I am not sure if it has even worked correctly, but calling dlsym("dlopen", RTLD_NEXT) returns reference to the dlopen() function in the libc, not reference to dlopen() function in the ld-elf.so. The attempt to call this function then fails, since dlopen() in libc is just a stub to make static linking happy.
#pragma weak dlopen
void *
dlopen(const char *name, int mode)
{
_rtld_error(sorry);
return NULL;
}
IMHO this is incorrect and is probably part of the bigger problem. The dlsym(3) should return first non-weak symbol instead.
-Maxim
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: dlsym(RTLD_NEXT) and weak symbols
- From: Maxim Sobolev
- Re: dlsym(RTLD_NEXT) and weak symbols
- Prev by Date: Re: umass quirk review ?
- Next by Date: Re: dlsym(RTLD_NEXT) and weak symbols
- Previous by thread: wpa_suuplicant(8) & wlan(4) vs. an(4) et al.
- Next by thread: Re: dlsym(RTLD_NEXT) and weak symbols
- Index(es):
Relevant Pages
|