diff options
| author | Chia-I Wu <olv@lunarg.com> | 2015-02-18 14:39:54 -0700 |
|---|---|---|
| committer | Chia-I Wu <olv@lunarg.com> | 2015-02-19 11:56:32 +0800 |
| commit | 394fc0efa0c50bdb995cba26732df77a070a5afa (patch) | |
| tree | e262ece1d138451a7c5e56c39add8176bb2e680f | |
| parent | 955f61e264ce33a7aedc2bd6762ed255cb545e38 (diff) | |
| download | usermoji-394fc0efa0c50bdb995cba26732df77a070a5afa.tar.xz | |
loader: do not set RTLD_DEEPBIND
Instead, build layers with -Bsymbolic. This should fix (or hide) a reported
crash with overriden malloc()/free().
| -rw-r--r-- | layers/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | loader/loader_platform.h | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt index 0655fa03..774574c1 100644 --- a/layers/CMakeLists.txt +++ b/layers/CMakeLists.txt @@ -31,6 +31,7 @@ else() add_library(XGLLayer${target} SHARED ${ARGN}) target_link_Libraries(XGLLayer${target} layer_utils) add_dependencies(XGLLayer${target} generate_xgl_layer_helpers) + set_target_properties(XGLLayer${target} PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic") endmacro() endif() diff --git a/loader/loader_platform.h b/loader/loader_platform.h index 9686b65d..d3fe4d73 100644 --- a/loader/loader_platform.h +++ b/loader/loader_platform.h @@ -71,10 +71,7 @@ typedef void * loader_platform_dl_handle; 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 - // 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); + return dlopen(libPath, RTLD_LAZY | RTLD_LOCAL); } static inline char * loader_platform_open_library_error(const char* libPath) { |
