Add RTLD_DEEPBIND option to dlopen for app executable 12/72812/1 accepted/tizen/common/20160606.141720 accepted/tizen/ivi/20160606.040603 accepted/tizen/mobile/20160606.035204 accepted/tizen/tv/20160606.035903 accepted/tizen/wearable/20160606.040107 submit/tizen/20160603.030057
authorSemun Lee <sm79.lee@samsung.com>
Thu, 2 Jun 2016 11:41:30 +0000 (20:41 +0900)
committerSemun Lee <sm79.lee@samsung.com>
Thu, 2 Jun 2016 11:41:30 +0000 (20:41 +0900)
When an application contains some private shared libraries
in its own /lib directory and a private shared library
has duplicated symbol with platform provided shared library,
application executable could not able to use the symbol
in its private shared library.

RTLD_DEEPBIND flag make the application executable to be
able to use the symbol in its private shared library.

Change-Id: Ic692f435e13033b5be2f6255a9a27051544c5a71
Signed-off-by: Semun Lee <sm79.lee@samsung.com>
src/launchpad_loader.c

index d24eee7f67e6c950c8d5762f88c7b1991eedcac0..0c19f91d4fd66ac70a572f340f52988703f46dd0 100644 (file)
@@ -208,7 +208,8 @@ static int __loader_terminate_cb(int argc, char **argv, void *user_data)
                restore = true;
 
 do_dlopen:
-       handle = dlopen(argv[LOADER_ARG_PATH], RTLD_LAZY | RTLD_GLOBAL);
+       handle = dlopen(argv[LOADER_ARG_PATH],
+                       RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND);
        if (handle == NULL) {
                _E("dlopen failed(%s). Please complile with -fPIE and "
                                "link with -pie flag", dlerror());