This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: *** SPAM LEVEL 4.448 *** Dynamic linker behaviour difference between Linux, Hurd and FreeBSD


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]