未验证 提交 57fd7a6e 编写于 作者: O openharmony_ci 提交者: Gitee

!865 Add ndk namespace

Merge pull request !865 from yinchuang/add_ndk_namesapce_1
[section.dir.map] [section.dir.map]
acquiescence = / acquiescence = /system/bin:/vendor/bin:/data/local/tmp
[acquiescence] [acquiescence]
namespace.default.lib.paths = /system/lib64:/vendor/lib64:/vendor/lib64/chipsetsdk:/system/lib64/ndk:/system/lib64/chipset-pub-sdk:/system/lib64/chipset-sdk:/system/lib64/platformsdk:/system/lib64/priv-platformsdk:/system/lib64/priv-module:/system/lib64/module:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/system/lib:/vendor/lib:/system/lib/ndk:/system/lib/chipset-pub-sdk:/system/lib/chipset-sdk:/system/lib/platformsdk:/system/lib/priv-platformsdk:/system/lib/priv-module:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/lib64:/lib:/usr/local/lib:/usr/lib:/vendor/lib64/hw added.nslist = ndk
namespace.ndk.lib.paths = /system/lib64/ndk:/system/lib/ndk
namespace.default.lib.paths = /system/lib64:/vendor/lib64:/vendor/lib64/chipsetsdk:/system/lib64/chipset-pub-sdk:/system/lib64/chipset-sdk:/system/lib64/platformsdk:/system/lib64/priv-platformsdk:/system/lib64/priv-module:/system/lib64/module:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/system/lib:/vendor/lib:/system/lib/chipset-pub-sdk:/system/lib/chipset-sdk:/system/lib/platformsdk:/system/lib/priv-platformsdk:/system/lib/priv-module:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/lib64:/lib:/usr/local/lib:/usr/lib:/vendor/lib64/hw
namespace.default.asan.lib.paths = /system/lib64:/system/lib64/module:/vendor/lib64:/vendor/lib64/chipsetsdk:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/system/lib:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/lib64:/lib:/usr/local/lib:/usr/lib:/vendor/lib64/hw namespace.default.asan.lib.paths = /system/lib64:/system/lib64/module:/vendor/lib64:/vendor/lib64/chipsetsdk:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/system/lib:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/lib64:/lib:/usr/local/lib:/usr/lib:/vendor/lib64/hw
[section.dir.map] [section.dir.map]
acquiescence = / acquiescence = /system/bin:/vendor/bin:/data/local/tmp
[acquiescence] [acquiescence]
namespace.default.lib.paths = /system/lib:/vendor/lib:/vendor/lib/chipsetsdk:/system/lib/ndk:/system/lib/chipset-pub-sdk:/system/lib/chipset-sdk:/system/lib/platformsdk:/system/lib/priv-platformsdk:/system/lib/priv-module:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/system/lib/module/security:/lib:/usr/local/lib:/usr/lib added.nslist = ndk
namespace.ndk.lib.paths = /system/lib/ndk
namespace.default.lib.paths = /system/lib:/vendor/lib:/vendor/lib/chipsetsdk:/system/lib/chipset-pub-sdk:/system/lib/chipset-sdk:/system/lib/platformsdk:/system/lib/priv-platformsdk:/system/lib/priv-module:/system/lib/module:/system/lib/module/data:/system/lib/module/multimedia:/system/lib/module/security:/lib:/usr/local/lib:/usr/lib
namespace.default.asan.lib.paths = /system/lib:/system/lib/module:/vendor/lib:/vendor/lib/chipsetsdk:/system/lib/module/data:/system/lib/module/multimedia:/system/lib/module/security:/lib:/usr/local/lib:/usr/lib namespace.default.asan.lib.paths = /system/lib:/system/lib/module:/vendor/lib:/vendor/lib/chipsetsdk:/system/lib/module/data:/system/lib/module/multimedia:/system/lib/module/security:/lib:/usr/local/lib:/usr/lib
[section.dir.map] [section.dir.map]
acquiescence = / acquiescence = /system/bin:/vendor/bin:/data/local/tmp
[acquiescence] [acquiescence]
namespace.default.lib.paths = /system/lib64:/vendor/lib64:/vendor/lib64/chipsetsdk:/system/lib64/ndk:/system/lib64/chipset-pub-sdk:/system/lib64/chipset-sdk:/system/lib64/platformsdk:/system/lib64/priv-platformsdk:/system/lib64/priv-module:/system/lib64/module:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/lib64 added.nslist = ndk
namespace.ndk.lib.paths = /system/lib64/ndk:/system/lib/ndk
namespace.default.lib.paths = /system/lib64:/vendor/lib64:/vendor/lib64/chipsetsdk:/system/lib64/chipset-pub-sdk:/system/lib64/chipset-sdk:/system/lib64/platformsdk:/system/lib64/priv-platformsdk:/system/lib64/priv-module:/system/lib64/module:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/lib64
namespace.default.asan.lib.paths = /system/lib64:/system/lib64/module:/vendor/lib64:/vendor/lib64/chipsetsdk:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/lib64 namespace.default.asan.lib.paths = /system/lib64:/system/lib64/module:/vendor/lib64:/vendor/lib64/chipsetsdk:/system/lib64/module/data:/system/lib64/module/multimedia:/system/lib64/module/security:/lib64
...@@ -37,6 +37,8 @@ static nslist g_ns_list; ...@@ -37,6 +37,8 @@ static nslist g_ns_list;
#define UT_STATIC static #define UT_STATIC static
#endif #endif
#define ALLOW_ALL_SHARED_LIBS "allow_all_shared_libs"
static ns_inherit_list *nsinherits_alloc() static ns_inherit_list *nsinherits_alloc()
{ {
ns_inherit_list *nsinl; ns_inherit_list *nsinl;
...@@ -584,7 +586,8 @@ bool is_sharable(ns_inherit *inherit, const char *lib_name) ...@@ -584,7 +586,8 @@ bool is_sharable(ns_inherit *inherit, const char *lib_name)
{ {
if (inherit && lib_name && inherit->shared_libs) { if (inherit && lib_name && inherit->shared_libs) {
for (size_t i = 0; i < inherit->shared_libs->num; i++) { for (size_t i = 0; i < inherit->shared_libs->num; i++) {
if (strcmp(inherit->shared_libs->strs[i], lib_name) == 0) { if (strcmp(inherit->shared_libs->strs[i], lib_name) == 0 ||
strcmp(inherit->shared_libs->strs[i], ALLOW_ALL_SHARED_LIBS) == 0) {
LD_LOGD("is_sharable inherit [%{public}s] lib_name [%{public}s] found, return true.", LD_LOGD("is_sharable inherit [%{public}s] lib_name [%{public}s] found, return true.",
inherit->inherited_ns->ns_name, inherit->inherited_ns->ns_name,
lib_name); lib_name);
......
...@@ -512,8 +512,9 @@ static int config_parse(const char *file_path, const char *exe_path) ...@@ -512,8 +512,9 @@ static int config_parse(const char *file_path, const char *exe_path)
if (sname) break; if (sname) break;
} }
if (!sname) { if (!sname) {
/* No matched section found, use the default section. */
sname = ATTR_NS_ACQUIESCENCE;
LD_LOGD("config_parse no section found!"); LD_LOGD("config_parse no section found!");
return -4;/* no section found */
} }
if (!(g_configor.kvs = config_get_kvs(sname))) { if (!(g_configor.kvs = config_get_kvs(sname))) {
LD_LOGD("config_parse no section key-value list found!"); LD_LOGD("config_parse no section key-value list found!");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册