Loading mozglue/interposers/InterposerHelper.h +9 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,14 @@ static inline T dlsym_wrapper(void* aHandle, const char* aName) { #endif // MOZ_LINKER } static inline void* dlopen_wrapper(const char* aPath, int flags) { #ifdef MOZ_LINKER return __wrap_dlopen(aPath, flags); #else return dlopen(aPath, flags); #endif // MOZ_LINKER } template <typename T> static T get_real_symbol(const char* aName, T aReplacementSymbol) { // T can only be a function pointer Loading @@ -41,7 +49,7 @@ static T get_real_symbol(const char* aName, T aReplacementSymbol) { // libc.so. Note that this won't work if we're trying to interpose // functions that are in other libraries, but hopefully we'll never have // to do that. void* handle = dlopen("libc.so", RTLD_LAZY); void* handle = dlopen_wrapper("libc.so", RTLD_LAZY); if (handle) { real_symbol = dlsym_wrapper<T>(handle, aName); Loading Loading
mozglue/interposers/InterposerHelper.h +9 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,14 @@ static inline T dlsym_wrapper(void* aHandle, const char* aName) { #endif // MOZ_LINKER } static inline void* dlopen_wrapper(const char* aPath, int flags) { #ifdef MOZ_LINKER return __wrap_dlopen(aPath, flags); #else return dlopen(aPath, flags); #endif // MOZ_LINKER } template <typename T> static T get_real_symbol(const char* aName, T aReplacementSymbol) { // T can only be a function pointer Loading @@ -41,7 +49,7 @@ static T get_real_symbol(const char* aName, T aReplacementSymbol) { // libc.so. Note that this won't work if we're trying to interpose // functions that are in other libraries, but hopefully we'll never have // to do that. void* handle = dlopen("libc.so", RTLD_LAZY); void* handle = dlopen_wrapper("libc.so", RTLD_LAZY); if (handle) { real_symbol = dlsym_wrapper<T>(handle, aName); Loading