In article <[EMAIL PROTECTED]> you wrote:
> 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.
Yes, I know, but I didn't say that the proposed "pic" options should be the
default for building libssl.a/libcrypto.a. But it's needed when you need PIC
there.
> 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.
It isn't such easy, because not all platforms support linking DSOs against
DSOs. There the only possibility is to build libssl.a/libcrypto.a with PIC.
For instance on ELF platforms it's fine to link the mod_ssl DSO against a
OpenSSL libssl.so/libcrypto.so. But on a.out platforms this doesn't work.
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]