I’m trying to override some standard library functions using LD_PRELOAD. However, I notice that my version is never called for some functions, for example, the gettimeofday one. I suspect gcc uses an inbuilt version for some of these functions.
Is there a way I can tell gcc to not use inbuilt standard library functions.
Use the gcc switch
-fno-builtin. Quoting from the gcc manual:More details: http://gcc.gnu.org/onlinedocs/gcc-3.0/gcc_3.html#SEC7