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]

Track libc calls


I'm doing a project in which I'm trying to intercept all libc calls to
do somethin' with ( for example track w/ buffer have been allocated
for a specific function call, like strdup() or printf() ).

There were some problems in doing this mainly for some reasons:

1) For efficiency, internal calls are direct jumps whenever possible
rather than going through the PLT, so it's impossible to intercept
calls within libc.Some functions, like abs() , aren't translated to a
library function call but are realized using assembly inline

2) Considering you want to override every function in libc (at time of
linking, using --wrap or ad runtime using LD_PRELOAD ) , this override
is allowed only for weak aliases, that are a little part of the whole
functions.

So, my question is: Is there a sane way to do this?

Thanks

Cheers


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