title: why I can't hook my private function with fishhook
body: <p>These days, I found that hook in an iOS application is hard, and found that there is a tool called "fishhook", created by facebook. I import the tool in my personal project, but it doesn't work. Am I wrong? Here are the source code:</p>
  
  <pre><code>#import &lt;dlfcn.h&gt;
  #import &lt;Foundation/Foundation.h&gt;
  #import "fishhook.h"
  
  static void (*orig_testABC)(void);
  
  void testABC()
  {
      NSLog(@"This is main log...");
  }
  
  void my_testABC()
  {
      NSLog(@"This is other log, not main log...");
  }
  
  void save_original_symbols()
  {
  //    void *handle = dlopen("/Users/bianyiji/Library/Developer/Xcode/DerivedData/HookTest-ghlgmahvsgfbqeekbrouzdyoxgdw/Build/Intermediates/HookTest.build/Debug/HookTest.build/Objects-normal/x86_64/main.o", RTLD_LAZY);
  //    printf("%s\n", handle);
      orig_testABC = dlsym(RTLD_DEFAULT, "testABC");
  }
  
  
  int main(int argc, const char * argv[]) {
      @autoreleasepool {
  //        save_original_symbols();
          int rebind_int = rebind_symbols((struct rebinding[1]){"testABC", my_testABC}, 1);
          printf("%d\n", rebind_int);
  
      }
      testABC();
      return 0;
  }
  </code></pre>
  
  <p>Although I called the function "testABC()", but I use "rebind_symbols" before, why I can't get my expected result...</p>