Just commit..

    --Jani


On Mon, 24 Jan 2005, Joe Orton wrote:

[ping]

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).

Index: Zend/zend.h
===================================================================
RCS file: /repository/ZendEngine2/zend.h,v
retrieving revision 1.268
diff -u -r1.268 zend.h
--- Zend/zend.h 10 Jan 2005 21:57:30 -0000      1.268
+++ Zend/zend.h 12 Jan 2005 11:34:03 -0000
@@ -104,6 +104,8 @@

# 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



-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to