Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14356 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23989 invoked by uid 1010); 12 Jan 2005 11:56:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 23916 invoked from network); 12 Jan 2005 11:56:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2005 11:56:08 -0000 X-Host-Fingerprint: 66.187.233.31 mx1.redhat.com Linux 2.4/2.6 Received: from ([66.187.233.31:45357] helo=mx1.redhat.com) by pb1.pair.com (ecelerity HEAD (r4059)) with SMTP id 60/1E-09312-D4015E14 for ; Wed, 12 Jan 2005 06:55:57 -0500 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j0CBtm8v031679 for ; Wed, 12 Jan 2005 06:55:48 -0500 Received: from radish.cambridge.redhat.com (radish.cambridge.redhat.com [172.16.18.90]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j0CBtmr02653 for ; Wed, 12 Jan 2005 06:55:48 -0500 Received: from radish.cambridge.redhat.com (localhost.localdomain [127.0.0.1]) by radish.cambridge.redhat.com (8.13.1/8.12.7) with ESMTP id j0CBtlNx012100 for ; Wed, 12 Jan 2005 11:55:47 GMT Received: (from jorton@localhost) by radish.cambridge.redhat.com (8.13.1/8.12.10/Submit) id j0CBtlMa012099 for internals@lists.php.net; Wed, 12 Jan 2005 11:55:47 GMT Date: Wed, 12 Jan 2005 11:55:47 +0000 To: internals@lists.php.net Message-ID: <20050112115547.GA11358@redhat.com> Mail-Followup-To: internals@lists.php.net Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: [PATCH] Zend dlopen flag for new glibc From: jorton@redhat.com (Joe Orton) 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