diff -rup ../i386/glib-2.20.1/gmodule/gmodule-dl.c glib-2.20.1/gmodule/gmodule-dl.c
--- ../i386/glib-2.20.1/gmodule/gmodule-dl.c 2009-04-01 01:04:20.000000000 +0200
+++ glib-2.20.1/gmodule/gmodule-dl.c 2009-05-14 16:39:16.692377272 +0200
@@ -95,9 +95,15 @@ _g_module_open (const gchar *file_name,
gboolean bind_local)
{
gpointer handle;
+
+ #if defined(sun) && defined(__SVR4)
+ /* Always use RTLD_LAZY on Solaris otherwise all relocations are
+ performed immediately in all dynamic dependencies */
+ bind_lazy = 1;
+ #endif
handle = dlopen (file_name,
- (bind_local ? 0 : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
+ (bind_local ? 0 : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY | RTLD_FIRST: RTLD_NOW));
if (!handle)
g_module_set_error (fetch_dlerror (TRUE));