loader: do not set RTLD_DEEPBIND

Instead, build layers with -Bsymbolic.  This should fix (or hide) a reported
crash with overriden malloc()/free().
This commit is contained in:
Chia-I Wu 2015-02-18 14:39:54 -07:00
parent e7f71a2fa7
commit 334e731449

View File

@ -71,10 +71,7 @@
typedef void * loader_platform_dl_handle; typedef void * loader_platform_dl_handle;
static inline loader_platform_dl_handle loader_platform_open_library(const char* libPath) static inline loader_platform_dl_handle loader_platform_open_library(const char* libPath)
{ {
// NOTE: The prior (Linux only) loader code always used RTLD_LAZY. In one return dlopen(libPath, RTLD_LAZY | RTLD_LOCAL);
// place, it used RTLD_DEEPBIND. It probably doesn't hurt to always use
// RTLD_DEEPBIND, and so that is what is being done.
return dlopen(libPath, RTLD_LAZY | RTLD_DEEPBIND | RTLD_LOCAL);
} }
static inline char * loader_platform_open_library_error(const char* libPath) static inline char * loader_platform_open_library_error(const char* libPath)
{ {