-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
None of _start, _end and __INIT_ARRAY__ present in library #30
Comments
Does the library #include <dlfcn.h>
#include <plthook.h>
plthook_t *plthook;
// The following code is same with what plthook_open does on Android except symbol names.
void *handle = dlopen("libunity.so", RTLD_LAZY | RTLD_NOLOAD);
if (handle == NULL) {
... error ...
}
void *addr = dlsym(handle, "any_symbol_name_exported_by_libunity_so");
if (addr != NULL) {
... error ...
}
int rv = plthook_open_by_address(&plthook, addr);
if (rv != 0) {
... error ...
} |
Thank you. So just to be sure I'm on the right page here: I should be calling dlopen/dlsym/plthook_replace on the library where the CALL I want to hook is located, not the library that holds the implememntation of the function (in my case, glBindBuffer). Thanks again. |
It depends on whether you use the fourth argument of |
Thanks. I did not use the fourth parameter. Thank you so much for your help |
No. If your code don't use the parameter, it doesn't depend on whether the PLT entry is resolved or not. |
I'll try debugging it further, thanks :) |
Hi
I'm trying to hook GLES calls on Android 10 for a Unity apk, but calling library (libunity.so) exports none of the 3 required symbols.
The rest of the libraries in the apk all export _end.
Any ideas? Thanks!
The text was updated successfully, but these errors were encountered: