Merge "Add android_dlopen_ext() interface to linker."

This commit is contained in:
Torne (Richard Coles)
2014-04-22 10:33:06 +00:00
committed by Gerrit Code Review
5 changed files with 70 additions and 16 deletions

View File

@@ -811,11 +811,15 @@ void do_android_update_LD_LIBRARY_PATH(const char* ld_library_path) {
}
}
soinfo* do_dlopen(const char* name, int flags) {
soinfo* do_dlopen(const char* name, int flags, const android_dlextinfo* extinfo) {
if ((flags & ~(RTLD_NOW|RTLD_LAZY|RTLD_LOCAL|RTLD_GLOBAL)) != 0) {
DL_ERR("invalid flags to dlopen: %x", flags);
return NULL;
}
if (extinfo != NULL && ((extinfo->flags & ~(ANDROID_DLEXT_VALID_FLAG_BITS)) != 0)) {
DL_ERR("invalid extended flags to android_dlopen_ext: %x", extinfo->flags);
return NULL;
}
set_soinfo_pool_protection(PROT_READ | PROT_WRITE);
soinfo* si = find_library(name);
if (si != NULL) {