[tor-dev] Size issues with Orbot statically linking OpenSSL

Eitan Adler lists at eitanadler.com
Mon Jan 16 06:11:35 UTC 2012

On Sun, Jan 15, 2012 at 7:30 PM, Steven Murdoch
<Steven.Murdoch at cl.cam.ac.uk> wrote:
> On 15 Jan 2012, at 20:47, Nick Mathewson wrote:
> Another thing to try: recent gccs and their toolchains have a trick where
> they can stick every function in its own segment, then tell the linker to
> dump the unused ones. I believe it's called "gc-segments" or something. I
> have no idea if it would work with openssl, but it could be worth
> investigating. I believe there's a ticket for tor to use it by default when
> possible.

clang does something similar with -O4 (link time optimization). See
http://llvm.org/docs/LinkTimeOptimization.html near "In this
example, the linker recognizes that foo2() ...." for more details

Eitan Adler

More information about the tor-dev mailing list