diff options
author | Semun Lee <sm79.lee@samsung.com> | 2016-07-20 15:30:44 +0900 |
---|---|---|
committer | Semun Lee <sm79.lee@samsung.com> | 2016-07-20 15:36:47 +0900 |
commit | f8212e604ee57067279c9c54a0562b5ffaa31ddb (patch) | |
tree | ccf1ba8567ab1cd5f392e526b7b787b112825d5a | |
parent | fe355b37562fc3f4ecb23bafbe643aea0831d019 (diff) | |
download | launchpad-f8212e604ee57067279c9c54a0562b5ffaa31ddb.tar.gz launchpad-f8212e604ee57067279c9c54a0562b5ffaa31ddb.tar.bz2 launchpad-f8212e604ee57067279c9c54a0562b5ffaa31ddb.zip |
Add RTLD_NODELETE flag for dlopensubmit/tizen/20160720.064256accepted/tizen/wearable/20160720.103533accepted/tizen/tv/20160720.103520accepted/tizen/mobile/20160720.103459accepted/tizen/ivi/20160720.103553accepted/tizen/common/20160720.173337
preloaded libraries and application executable does not
need to be unloaded during process lifetime.
Change-Id: Iebf86725d24b33e12df1d163089547933b8f8031
Signed-off-by: Semun Lee <sm79.lee@samsung.com>
-rwxr-xr-x | inc/preexec.h | 2 | ||||
-rw-r--r-- | src/launchpad_loader.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/inc/preexec.h b/inc/preexec.h index 23bc9c5..4b5b7cd 100755 --- a/inc/preexec.h +++ b/inc/preexec.h @@ -92,7 +92,7 @@ static inline void __preexec_init(int argc, char **argv) return; } - handle = dlopen(sopath, RTLD_GLOBAL | RTLD_LAZY); + handle = dlopen(sopath, RTLD_GLOBAL | RTLD_LAZY | RTLD_NODELETE); if (handle == NULL) { free(type_t); continue; diff --git a/src/launchpad_loader.c b/src/launchpad_loader.c index 0868cd1..23b0cb9 100644 --- a/src/launchpad_loader.c +++ b/src/launchpad_loader.c @@ -159,7 +159,7 @@ static void __preload_lib(bundle *b) return; for (i = 0; i < len; i++) { - handle = dlopen(so_array[i], RTLD_NOW); + handle = dlopen(so_array[i], RTLD_NOW | RTLD_NODELETE); _D("preload %s# - handle : %x\n", so_array[i], handle); } } @@ -310,7 +310,8 @@ static int __loader_terminate_cb(int argc, char **argv, void *user_data) do_dlopen: handle = dlopen(argv[LOADER_ARG_PATH], - RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND); + RTLD_LAZY | RTLD_GLOBAL + | RTLD_DEEPBIND | RTLD_NODELETE); if (handle == NULL) { _E("dlopen failed(%s). Please complile with -fPIE and " \ "link with -pie flag", dlerror()); |