Are you really intending to have the library as a shared object in this embedded system? How many different executables will be linked against it?
A more usual approach if you want to minimize size is to do a static build of the OpenSSL library and link against that. Your executable will then only include the bits of OpenSSL code that it needs. You're only likely to get space benefit from using a shared library if many different executables are linked against OpenSSL and running at the same time. In this case it might be possible to slim down the shared object to contain just what you need, but I don't think there's an easy way to do so. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Du Jingwu > Sent: Thursday, July 27, 2006 19:32 > To: openssl-users@openssl.org > Subject: How to cut down openssl library for embedded system. > > Hi all, I'd like to use openssl in embedded system. I learn > from the following url that openssl can be trimmed down to 200K. > > http://groups.google.com/group/mailing.openssl.users/browse_fr > m/thread/9a5232984fe12dc4/6b593af39bd56d76?q=embedded&rnum=8#6 b593af39bd56d76 > > So I start my own config: > > ./Configure linux-mipsel --prefix=/ --openssldir=/usr/lib/ssl -ldl \ > shared no-asm no-dso no-zlib no-krb5 no-engine no-hw \ > no-bf no-cast no-dh no-md2 no-mdc2 no-rc2 no-rc4 no-rc5 \ > no-idea no-rijndael no-aes\ > no-ede no-ede3 no-cbc no-cfb no-ofb no-ecb no-base64 no-md4 > no-rmd160 \ > no-cast5 no-dsa no-ssl no-ssl2 > > I built it with uClibc 0.9.2 with gcc 3.3.2, but the size was > still huge: > > |----------------+--------------------+---------+-------------------| > | openssl-0.9.7e | libcrypto.so.0.9.7 | 1202920 | uclibc, stripped | > |----------------+--------------------+---------+-------------------| > | | libssl.so.0.9.7 | 250244 | uclibc, stripped | > |----------------+--------------------+---------+-------------------| > > How can I have a much smaller one? I think the > libcrypto.so.0.9.7 has much potential code to cut, but I > don't know how to start. Any hints or guides are much appreciated. > > Best Regards, > Levin Du > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager [EMAIL PROTECTED] > ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]