> -----Original Message-----
> From: Jussi Kohonen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 14, 2000 2:30 AM
> 
> There is a public function named SHA1_Update in netscape httpd itself
(yes,
> I wasted some time with this too!), and that function of course does not
> have same parameters as the OpenSSL SHA1_Update.
> Because you hardly have access to netscape's source code, you have to bend
> over and rename the SHA1_Update function in OpenSSL to something else -
> lots of files to update. Or link the OpenSSL crypto library using -Wl,-
> Bsymbolic option. This should prevent the unix loader from resolving calls
> from crypto library to netscape httpd's code (which in my opinion is a
> really strange if not stupid feature of solaris/linux). 

Note that shared objects loaded by Netscape Application Server (NAS, the
former Kiva product, not to be confused with NES) generally have to be
linked with -Bsymbolic.  It's probably a good practice to link OpenSSL with
that option on Solaris if you plan to use it with any Netscape product.

-Bsymbolic causes the linker to prebind references to their definitions if
those definitions are already available in the dynamic object - eg. calls
within OpenSSL to SHA1_Update will be prebound to OpenSSL's SHA1_Update.
Without -Bsymbolic, calls in OpenSSL to SHA1_Update (or whatever) won't be
bound until runtime, at which point they can latch onto the available
function in NES.  (If NES' SHA1_Update were scope-reduced to not be
available via NSAPI, or if its linkage were "weak", then OpenSSL's
definition could override NES' for OpenSSL's purpose.  At least if I
understand this stuff correctly.  The subtleties of Solaris linking are
mightily confusing.)

-Bsymbolic isn't the default because it was added some time after the switch
to SysV linking (with Solaris 2) and making it the default would have broken
existing code; it interferes (slightly) with calling back from a loaded
module into the loading program; and prebinding is a religious issue.
(There was much wailing over AIX 3's prebinding of dynamic objects,
particularly because the implementation of libc in 3.1 as a pretty much
monolithic single shared object in an archive made it difficult to interpose
malloc and other libc functions without understanding the vagaries of AIX
linking.  The moral, of course, is that you never know enough about how the
linker and loader work.)

Michael Wojcik             [EMAIL PROTECTED]
MERANT
Department of English, Miami University
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to