- int flags = RTLD_LAZY | RTLD_GLOBAL;
-#if defined(__APPLE__)
- // RTLD_FIRST is an apple specific flag which causes dlsym() to search only
- // the module specified in |filename|, and not dependent modules. This
- // behavior would be desirable for other platforms as well, except that
- // there's not a good way to implement it.
- flags |= RTLD_FIRST;
-#endif
- void *handle = dlopen(filename, flags);