Mercurial > octave
diff liboctave/util/oct-shlib.cc @ 20493:3f01c585f54e
oct-shlib.cc: Use RTLD_GLOBAL option for dlopen
* oct-shlib.cc (octave_dlopen_shlib::octave_dlopen_shlib): Use RTLD_GLOBAL
option for dlopen.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Mon, 21 Sep 2015 17:15:17 +0200 |
parents | 4197fc428c7d |
children | bd1752782e56 |
line wrap: on
line diff
--- a/liboctave/util/oct-shlib.cc Tue Sep 15 08:48:35 2015 -0400 +++ b/liboctave/util/oct-shlib.cc Mon Sep 21 17:15:17 2015 +0200 @@ -195,6 +195,12 @@ flags |= RTLD_NOW; #endif + // Use RTLD_GLOBAL to export symbols from loaded objects so they are + // available to other subsequently loaded libraries. +#if defined (RTLD_GLOBAL) + flags |= RTLD_GLOBAL; +#endif + library = dlopen (file.c_str (), flags); if (! library)