shared libraries vs test cases

Richard Levitte levitte at openssl.org
Wed Feb 27 16:52:08 UTC 2019


On Wed, 27 Feb 2019 17:04:09 +0100,
Michael Richardson wrote:
> 
> Running LDD on the binaries in test/* shows that they appear to link against
> the "system" copies of libssl and libcrypto.
> 
> Perhaps something I'm missing is setting up LD_PRELOAD or some such so that
> the tests run the local copy of libssl/libcrypto, but I can't find that.
> Am I missing something?
> 
> This is, I think, making it very difficult for me to bisect a problem.
> 
> It seems to me that the test cases ought to be statically linked to make
> it easiest to know what code they are running.  (This also makes it slightly
> easier to use gdb on them)

There's a script called util/shlib_wrap.sh that you place first on the
command line:

./util/shlib_wrap.sh test/whatevertest

./util/shlib_wrap.sh ldd test/whatevertest

./util/shlib_wrap.sh gdb test/whatevertest

Cheers,
Richard

-- 
Richard Levitte         levitte at openssl.org
OpenSSL Project         http://www.openssl.org/~levitte/


More information about the openssl-users mailing list