Section 2.2 of this document may be of help:

http://people.redhat.com/drepper/dsohowto.pdf

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: "Crypto++ Users" <[EMAIL PROTECTED]>
Sent: Monday, March 26, 2007 3:21 AM
Subject: reducing size of shared library that uses crypto++


>
> Hi,
>
> I'm working on a shared library that uses some of the Crypto++
> functionality, so it links with the statically linked version of Crypto
> ++. The problem is that on Linux the resulting object's size is 4M,
> even though it doesn't use that much of Crypto++. I'm sure that not
> all of the 4M is needed since I can compile the object as a
> (functioning) executable and then its size is about 300K. Also, the
> size of the same shared library compiled on Windows and linked to the
> static library is about 300K.
>
> The flags I use to compile crypto++ are:
>
> CXXFLAGS = -O -ffunction-sections -fdata-sections
> LDFLAGS += -Wl,--gc-sections
>
> I compile my library like this: g++ -shared mylib.o libcryptopp.a
>
> What flags should I pass to the compiler or the linker in order to
> make a shared library that is statically linked to Crypto++ and has
> minimal size?
>
> Thanks
> Amnon
>
>
> > 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to