1 2 3 4 5 6 7 8 9 10 11
#include <mach-o/dyld-interposing.h> #include "foo.h" int myfoo() { foo(); return 20; } DYLD_INTERPOSE(myfoo, foo)