修訂 | d5e1f8a543f8f7364e8c7a0ca7c74310ac35b945 (tree) |
---|---|
時間 | 2017-06-01 16:15:06 |
作者 | android-build-team Robot <android-build-team-robot@goog...> |
Commiter | android-build-team Robot |
release-request-18270495-77c6-4d95-8968-eb22e3d2fe8b-for-git_oc-release-4057656 snap-temp-L93200000069424216
Change-Id: Ia550b92ea7680c3616a4e634832b0cc267eda6be
@@ -82,7 +82,14 @@ static int load(const char *id, | ||
82 | 82 | * dlopen returns. Since RTLD_GLOBAL is not or'd in with |
83 | 83 | * RTLD_NOW the external symbols will not be global |
84 | 84 | */ |
85 | - handle = android_load_sphal_library(path, RTLD_NOW); | |
85 | + if (strncmp(path, "/system/", 8) == 0) { | |
86 | + /* If the library is in system partition, no need to check | |
87 | + * sphal namespace. Open it with dlopen. | |
88 | + */ | |
89 | + handle = dlopen(path, RTLD_NOW); | |
90 | + } else { | |
91 | + handle = android_load_sphal_library(path, RTLD_NOW); | |
92 | + } | |
86 | 93 | if (handle == NULL) { |
87 | 94 | char const *err_str = dlerror(); |
88 | 95 | ALOGE("load: module=%s\n%s", path, err_str?err_str:"unknown"); |