in constructor in hook.c: #define GOT_DLOPEN_ADDR 0x081be558 *(void **)GOT_DLOPEN_ADDR = eth_dlopen; so change name of function dlopen to eth_dlopen and remove: if (orig_dlsym == NULL) { orig_dlsym = &dlsym; *((void *(**)(const char *, int))DLSYM_GOT) = (void *(*)(const char *, int)) &wrap_dlsym; }