summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-01-25 13:08:05 +0000
committerfoobar <sniper@php.net>2005-01-25 13:08:05 +0000
commit601140cbe9ab057b3c8162dda09e18d741652599 (patch)
treeddda7a8f18318af920664228c7eea14b1f0e3a95
parent25ab28c48f461a4ebfe1412ef29c76cd06a4fe40 (diff)
downloadphp-git-601140cbe9ab057b3c8162dda09e18d741652599.tar.gz
New versions of glibc support a RTLD_DEEPBIND flag to dlopen. The
effect of this flag when loading a "foo.so" with undefined symbols is that the search that symbol starts at foo.so and its dependencies *before* the loading process' global symbol table. This is an effective workaround for symbol namespace collisions between various modules and the libraries on which they depend (where fixing the respective modules or libraries is not possible e.g. due to API constraints). (By: Joe Orton)
-rw-r--r--Zend/zend.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Zend/zend.h b/Zend/zend.h
index 5c9ec20873..0ec9fd3c14 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -104,6 +104,8 @@ const char *zend_mh_bundle_error(void);
# if defined(RTLD_GROUP) && defined(RTLD_WORLD) && defined(RTLD_PARENT)
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_GROUP | RTLD_WORLD | RTLD_PARENT)
+# elif defined(RTLD_DEEPBIND)
+# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)
# else
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
# endif