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>
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());