Ralf S. Engelschall wrote:
> my Solaris 2.6 horrible crashes without PIC in OpenSSL. So, I've just added
> "-fPIC" to the solaris-sparc-gcc line in OpenSSL's Configure script,
> recompiled my libssl.so (that's mod_ssl's DSO, not the ssl library of OpenSSL)
> with the now PIC-aware libssl.a (that's OpenSSL's ssl library) and BINGO: All
> works fine. No more core dumps on new SSL connections.
> 
> Seems like we should add a "pic" option to the Configure scripts which either
> adds -fPIC (for GCC) or -KPIC (for SVR4), etc...

IMHO making the static libs PIC is a bad idea.  PIC is bigger and slower on
most systems (sometimes much slower).  This problem applies to other os'es,
but do their loaders handle PIC in non-PIC images okay?  Dunno.  They
sometimes do funny things with programs containing both PIC and non-PIC parts
in one memory space;  e.g. HPUX has (had?) a problem where it could cause a
50% slowdown because it had to use a different memory mapping scheme.

If you're linking the OpenSSL libs into a DSO (a.k.a. shared library), seems
"the right way" is to bring the shared lib support in ssl/ssl.c,
crypto/crypto.c, and shlib/ up to date, then build shared OpenSSL libs and
link to them.  The relevant patches have been posted, works fine for me on
Solaris & HPUX, etc.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to