Пример #1
0
void* dlopen(const char* filename, int flag) {
  ScopedPthreadMutexLocker locker(&gDlMutex);
  soinfo* result = find_library(filename);
  if (result == NULL) {
    __bionic_format_dlerror("dlopen failed", linker_get_error());
    return NULL;
  }
  soinfo_call_constructors(result);
  result->refcount++;
  return result;
}
Пример #2
0
static void set_dlerror(int err)
{
    format_buffer(dl_err_buf, sizeof(dl_err_buf), "%s: %s", dl_errors[err],
             linker_get_error());
    dl_err_str = (const char *)&dl_err_buf[0];
};