lkml.org 
[lkml]   [1999]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Idea for LD_PRELOAD (retraction)
Adam J. Richter wrote:
> > The problem with LD_PRELOAD is that it can only replace function
> >definitions, rather than "wrap" additional work around functions,
>
> I would like to thank Artur Skawina for pointing out that
> this can be done with dlsym(RTLD_NEXT, "symbol") and even include
> a sample program, and also Ulrich Drepper for saying that there
> was a way to do it with dlsym.

Aye, but that's not as _fast_ as dynamic-link-time wrappers :-)
(Pointer lookups all over the place).

It's a bit icky if you want to use the looked-up symbol from a C++
static constructor too.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.164 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site