At Thu, 23 Feb 2006 10:46:25 +0100, Andrea Gasparini wrote: > i'm at first post in this list, and i'm searching for a solution to one > problem, so excuse me if it's not pefectly in topic here... > > So, this is the problem: > i want to wrap almost all system call with LD_PRELOAD, and i would like to > write a minimal library (rewrite all libc is quite boring... :-P ) > I would prefer to write only write(), open() and not having to rewrite > functions like fopen(), printf() and so on... > > I found that with --disable-hidden-plt configure option i can build a > dynamic library that can be preloaded with my own library: something like > $LD_PRELOAD="./libtest.so ./libc.nohidden.so" a.out > > > but it doesn't work... or better: it works for write(),open() that i > directly write into "libtest.so", but printf doesn't call write, so i > can't intercept it...
Glibc internally handles system call directly. It also sometimes uses wrapper name prefixed with __ . -- gotom -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

