[openssl-dev] Split libcrypto.so for coreutils optimization

Richard Levitte levitte at openssl.org
Thu Jun 16 05:26:17 UTC 2016


In message <CAK5mtey2nr3yPbVe+66yqSX-5TtTTEFMpwSGYqHyOinBp=zsVA at mail.gmail.com> on Wed, 15 Jun 2016 18:05:04 -0500, Victor Rodriguez <vm.rod25 at gmail.com> said:

vm.rod25> HI team
vm.rod25> 
vm.rod25> I am enabeling the  optimized coreutils sha*sum utils as metioned in
vm.rod25> this thread:
vm.rod25> 
vm.rod25> https://lists.clearlinux.org/pipermail/dev/2016-April/000278.html
vm.rod25> 
vm.rod25> However the libcrypto.so.1.0.0 is too heavy for our base distro ( 2.2MB )
vm.rod25> 
vm.rod25> I am looking for a way to make a patch for our distro ( clearlinux) to
vm.rod25> split it and provide
vm.rod25> 
vm.rod25> %files lib
vm.rod25> %{_libdir}/libcrypto.so.1.0.0
vm.rod25> %{_libdir}/libcryptosum.so.1.0.0
vm.rod25> %{_libdir}/libssl.so.1.0.0
vm.rod25> 
vm.rod25> I am reading th code , but I can not find a clear path where to split it
vm.rod25> 
vm.rod25> Any help is more than welcome

First of all, there's a question of dependency.  Do you intend to have
libcrypto.so depend on libcryptosum.so, or do you want libcryptosum.so
to be an entirely separate library, not to be mixed with libssl.so and
libcrypto.so?

Either way, the place to look into is crypto/sha/Makefile for OpenSSL
1.0.2 series or older, or crypto/sha/build.info for the upcoming 1.1.0
series.  You'd have to change the name of the library that the source
is going to be compiled into, or for a completely separate libcryptosum, 
you'll have to do a bit of duplication so the same object files get
placed in both libraries, libcrypto and libcryptosum.

There's a bit more work to do to complete this scheme, but there's at
least your starting point.  The API is declared in include/openssl/sha.h

Cheers,
Richard

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


More information about the openssl-dev mailing list