Dear all,

In the current implementation (at least in 4.2.0) dynamic modules are
loaded using 

handle = dlopen(foundname, RTLD_LAZY);

which prevents the symbols defined within a module to be exported for
latter re-use (either by a latter module or by a module itself loaded
within the current module: which is what I need for my particular
application). I propose the following patch which fixes the problem
(for SunOS-style dynamic loading).

Any comment welcome,

All the best,

Stephane


--- dx-4.2.0/src/exec/dpexec/loader.c.old       Tue Nov 26 16:50:18 2002
+++ dx-4.2.0/src/exec/dpexec/loader.c   Tue Nov 26 14:46:36 2002
@@ -616,7 +616,7 @@ PFI DXLoadObjFile(char *fname, char *env
      *  filename, mode.  the mode is: RTLD_LAZY (defer binding of procs)
      *  other vals are reserved for future expansion.
      */
-    handle = dlopen(foundname, RTLD_LAZY);
+    handle = dlopen(foundname, RTLD_LAZY|RTLD_GLOBAL);
     if (handle == NULL) {
        char *cp = dlerror();
        if (cp)

Reply via email to