This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: *** SPAM LEVEL 4.448 *** Dynamic linker behaviour difference between Linux, Hurd and FreeBSD
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Simon Richter <sjr at debian dot org>
- Cc: libc-help at sourceware dot org, bug-hurd at gnu dot org
- Date: Fri, 3 May 2013 09:11:57 -0700
- Subject: Re: *** SPAM LEVEL 4.448 *** Dynamic linker behaviour difference between Linux, Hurd and FreeBSD
- References: <5183D388 dot 5030201 at debian dot org>
On Fri, May 3, 2013 at 8:11 AM, Simon Richter <sjr@debian.org> wrote:
> I'm writing a small preload library to trace pthread_* calls ...
> In order to find the original function, I use dlsym(RTLD_NEXT, ...) ...
> In any case, I am wondering if it is actually possible to redirect the
> pthread_* functions in this way, or if a different approach is required.
In general: no. You can't expect dlsym() to not call any pthread_*
functions. Even if this happens to work today for some versions of
glibc on Linux, there is absolutely no guarantee that it will continue
to work tomorrow.
--
Paul Pluzhnikov