1 Patch migrated from Desktop, where it was listed as:
2 # owner:laca type:bug date:2005-10-13
4 After talking with Rod, it seems like this should apply to all platforms;
5 not just Solaris, otherwise there could be a significant performance
6 penalty at startup. Need to file upstream bug for that.
8 diff --git a/gmodule/gmodule-dl.c b/gmodule/gmodule-dl.c
9 index c1c2fce..d71595e 100644
10 --- a/gmodule/gmodule-dl.c
11 +++ b/gmodule/gmodule-dl.c
12 @@ -133,10 +133,18 @@ _g_module_open (const gchar *file_name,
17 +#if defined(__sun) && defined(__SVR4)
19 + * Always use RTLD_LAZY on Solaris; otherwise all relocations are performed
20 + * immediately in all dynamic dependencies.
26 handle = dlopen (file_name,
27 - (bind_local ? 0 : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
28 + (bind_local ? 0 : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY | RTLD_FIRST : RTLD_NOW));
31 const gchar *message = fetch_dlerror (TRUE);