static void * _android_egl_dlsym(const char *symbol) { if (_libegl == NULL) _init_androidegl(); return android_dlsym(_libegl, symbol); }
int main(int argc, char **argv) { void *foo = android_dlopen(argv[1], RTLD_LAZY); void* (*hello)(char a, char b); assert(foo != NULL); hello = android_dlsym(foo, "hello"); assert(hello != NULL); (*hello)('z', 'd'); printf("full stop\n"); exit(0); }
static inline void *__resolve_sym(const char *sym) { __load_library(); void *ptr = android_dlsym(__handle, sym); assert(ptr != NULL); if (!ptr) { // calling abort() is bad but it does not matter anyway as we will crash. abort(); } return ptr; }
void *hybris_dlsym(void *handle, const char *symbol) { return android_dlsym(handle,symbol); }