diff --git a/fishhook.h b/fishhook.h index 919ff43..0d8e36a 100644 --- a/fishhook.h +++ b/fishhook.h @@ -27,6 +27,12 @@ #include #include +#if !defined(FISHHOOK_EXPORT) +#define FISHHOOK_VISIBILITY __attribute__((visibility("hidden"))) +#else +#define FISHHOOK_VISIBILITY __attribute__((visibility("default"))) +#endif + #ifdef __cplusplus extern "C" { #endif //__cplusplus @@ -49,12 +55,14 @@ struct rebinding { * rebind are added to the existing list of rebindings, and if a given symbol * is rebound more than once, the later rebinding will take precedence. */ +FISHHOOK_VISIBILITY int rebind_symbols(struct rebinding rebindings[], size_t rebindings_nel); /* * Rebinds as above, but only in the specified image. The header should point * to the mach-o header, the slide should be the slide offset. Others as above. */ +FISHHOOK_VISIBILITY int rebind_symbols_image(void *header, intptr_t slide, struct rebinding rebindings[],