bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with library preloading


From: Manuel Arriaga
Subject: Problems with library preloading
Date: Sun, 14 Oct 2001 12:15:24 -0700

Hi,

Since this isn't a GNU libc question, I suspect that I might be emailing the
wrong people. If that is so, and if you know whom I should direct ld.so
queries to, please let me know.

I have written a shared library which, when preloaded under GNU/Linux,
intercepts calls to unlink(), rename() and a few other functions in order to
avoid the accidental loss of files. It is available from
http://www.m-arriaga.net/software/libtrash. Besides the wrappers, it defines
two functions called _init() and _fini(), on which it relies for its
initialization and clean-up, respectively.

But, when I run certain programs, the _init() and _fini() functions aren't
invoked by ld.so (I think that is ld.so's task, correct me if I am wrong),
causing the library to fail and preventing the correct working of those
programs. As far as I can tell, this only happens with programs in the
procps package: ps, top, free, etc...

Can you offer any advice on why this might be happening? Why aren't _init()
and _fini() called when certain programs are run?

Thank you for any help.

Cheers,

Manuel Arriaga

PS: I apologize for the poor line-wrapping, I am not using my machine...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]