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]

How to override printf/scanf calls


I know that I can override most system calls in libc writing the function
with the right signature and then creating a shard library out of it and use
the LD_PRELOAD mechanism when I run any application. This method doesn't not
work for libc calls like printf/scanf. Writing a shared library with any of
this calls has issues as ld cant preload this shared library. The only other
option I have at the moment is to download glibc source and rebuild glibc
with appropriate changes. This makes the solution not portable, I was
wondering if there was any other way by which I could override libc calls
like printf/scanf?

Regards,

Bharath

Attachment: smime.p7s
Description: S/MIME cryptographic signature


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