I am trying to override some libc functions (eg: puts()
) with my own implementation.
I have defined my own implementation in a dylib file as follows.
int puts ( const char * str );
When I link my binary with the dylib file in Xcode and build, my overridden version gets called.
However, when I inject the dylib into my binary, I see that the overridden version is not called. I have verified that the dylib is getting loaded by logging something in the entry point of the dylib.
Can someone here point me to what I'd need to do to get my overridden version called?