Hello folks,
Loading a library that has symboles that are exported in the actual program causes a mixup of the symbol names and the called functions.
Some unix systems have the flag RTLD_GROUP to fix this.
Please include the folowing patch to allow this feature in OpenSSL.
> cvs diff -u ? lib cvs server: Diffing . Index: dso.h =================================================================== RCS file: /usr/cvsroot/openssl/crypto/dso/dso.h,v retrieving revision 1.3 diff -u -r1.3 dso.h --- dso.h 2003/04/25 15:59:01 1.3 +++ dso.h 2004/06/25 11:54:32 @@ -102,6 +102,14 @@ */ #define DSO_FLAG_GLOBAL_SYMBOLS 0x20
+/* This flag loads the library self containing. + * Meaning: no symbols from the program are exported to the library. + * This is usefull if the library has symbols that are used + * and exported in the program (and libraries loaded by it) + * At the moment only implemented in unix. + */ +#define DSO_FLAG_GROUP_SYMBOLS 0x40 + typedef void (*DSO_FUNC_TYPE)(void);
typedef struct dso_st DSO; Index: dso_dlfcn.c =================================================================== RCS file: /usr/cvsroot/openssl/crypto/dso/dso_dlfcn.c,v retrieving revision 1.5.4.1 diff -u -r1.5.4.1 dso_dlfcn.c --- dso_dlfcn.c 2004/06/25 11:54:12 1.5.4.1 +++ dso_dlfcn.c 2004/06/25 11:54:32 @@ -152,6 +152,10 @@ if (dso->flags & DSO_FLAG_GLOBAL_SYMBOLS) flags |= RTLD_GLOBAL; #endif +#ifdef RTLD_GROUP + if (dso->flags & DSO_FLAG_GROUP_SYMBOLS) + flags |= RTLD_GROUP; +#endif ptr = dlopen(filename, flags); if(ptr == NULL)
Bye
Goetz { -- Goetz Babin-Ebell, software designer, TC TrustCenter AG, Sonninstr. 24-28, 20097 Hamburg, Germany Office: +49-(0)40 80 80 26 -0, Fax: +49-(0)40 80 80 26 -126 www.trustcenter.de www.betrusted.com
smime.p7s
Description: S/MIME Cryptographic Signature