[PATCH] Zend dlopen flag for new glibc

php.internals

Joe Orton

21 years ago
[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

Sascha Schumann

21 years ago
+1 - Sascha On Mon, 24 Jan 2005, Joe Orton wrote: [snip]

Jani Taskinen

21 years ago
Just commit.. --Jani On Mon, 24 Jan 2005, Joe Orton wrote:

Joe Orton

21 years ago
On Tue, Jan 25, 2005 at 03:41:40AM +0200, Jani Taskinen wrote:
> Just commit..
I don't have Zend commit access, can someone do it for me?
> 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).
...

Jani Taskinen

21 years ago
Done. --Jani On Tue, 25 Jan 2005, Joe Orton wrote: