From e666c4599f017c244873a0184807ee22058a70b3 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 11 Jun 2003 22:42:28 +0000 Subject: Add the possibility to have symbols loaded globally with DSO. --- crypto/dso/dso_dlfcn.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'crypto/dso/dso_dlfcn.c') diff --git a/crypto/dso/dso_dlfcn.c b/crypto/dso/dso_dlfcn.c index de88b2f..259aee8 100644 --- a/crypto/dso/dso_dlfcn.c +++ b/crypto/dso/dso_dlfcn.c @@ -140,13 +140,19 @@ static int dlfcn_load(DSO *dso) void *ptr = NULL; /* See applicable comments in dso_dl.c */ char *filename = DSO_convert_filename(dso, NULL); + int flags = DLOPEN_FLAG; if(filename == NULL) { DSOerr(DSO_F_DLFCN_LOAD,DSO_R_NO_FILENAME); goto err; } - ptr = dlopen(filename, DLOPEN_FLAG); + +#ifdef RTLD_GLOBAL + if (dso->flags & DSO_FLAG_GLOBAL_SYMBOLS) + flags |= RTLD_GLOBAL; +#endif + ptr = dlopen(filename, flags); if(ptr == NULL) { DSOerr(DSO_F_DLFCN_LOAD,DSO_R_LOAD_FAILED); -- cgit v1.1