| Paul Pluzhnikov 2006-03-21, 5:56 pm |
| Frank Cusack <fcusack@fcusack.com> writes:
>
> Yes he did state that, and that's why I wonder why you'd need to
> dlopen() it.
So that he pass the handle to dlsym().
> If you are *interposing* on (e.g.) open() by using
> LD_PRELOAD, then the original binary is already linked to the library
> containing it, and the runtime linker has already loaded it, and you
> only need to call dlsym(RTLD_NEXT, ...).
Correct. However the OP didn't know (or understand) RTLD_NEXT.
> Even if you are interposing on all functions in a library, doesn't the
> runtime linker open that library anyway?
Yes, the runtime loader will open it anyway (if it is recorded as
DT_NEEDED in the main exe or any of the DSOs the exe depends on).
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
|