theos/logos

Add option to specify library path to %hookf("func")

Closed this issue · 1 comments

It would be good to be able to search a specific library for the symbol provided instead of always using MSFindSymbol(NULL, "symbol")

perhaps %hookf(type, "/usr/lib/libname.dylib:symbol" would make sense

0eb6602 should allow doing this using:

%hookf(type, symbol, args) {}
%ctor {
	void * handle = dlopen("/usr/lib/libname.dylib", RTLD_LAZY);
	%init(symbol = dlsym(handle, "symbol"));
}