dlsym() on implicit loaded symbols
Roland.Dittel at web.de
Sun Jul 16 10:57:08 UTC 2006
Simon 'corecode' Schubert wrote:
> Roland Dittel wrote:
>> Hi all,
>> We have a issue with dlsym() on symbols imported by a library that was
>> loaded with dlopen(). Our code loads the libssl with dlopen() and then
>> do a dlsym() on several symbols. This works for all symbols exported
>> by libssl itself but fails for symbols exported by libcrypto. Libssl
>> is dynamically linked to libcrypto and should be loaded for libssl. I
>> did a truss and the FreeBSD loader loads libcrypto but does not read
>> anything from the file pointer.
> could you post a sample code fragment which illustrates the problem you
> are seeing?
Sure, attached is a simple example that tries to load the symbol
CRYPTO_set_id_callback from a libssl handle. The symbol is located in
libcrypto and NOT in libssl. Because libssl is dynamically linked to
libcrypto I would expect the loader is able to find the symbol, but
that's not the case on freebsd.
More information about the freebsd-hackers