From 601140cbe9ab057b3c8162dda09e18d741652599 Mon Sep 17 00:00:00 2001 From: foobar Date: Tue, 25 Jan 2005 13:08:05 +0000 Subject: [PATCH] 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) --- Zend/zend.h | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.50.1