MindMac/AndroidEagleEye

Hook same method name for different library module

hqt opened this issue · 0 comments

hqt commented

For example I want to hook a method named hook_method in two module liba and libb

int hook_method(void *ctx);
HOOK_INFO custom_hook_info_hook_method={{}, "liba", "hook_method", hook_method, hook_method};
HOOK_INFO custom_hook_info_hook_method={{}, "libb", "hook_method", hook_method, hook_method};

But when compiling, I will meet error:

note: previous definition of 'custom_hook_info_hook_method'

So how can I hook same method name for two different libraries.