[tor-bugs] #2915 [Tor Client]: Explore options to reduce binary size of Tor

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sat Apr 16 01:34:53 UTC 2011


#2915: Explore options to reduce binary size of Tor
-------------------------+--------------------------------------------------
 Reporter:  Sebastian    |          Owner:                  
     Type:  enhancement  |         Status:  new             
 Priority:  minor        |      Milestone:  Tor: unspecified
Component:  Tor Client   |        Version:                  
 Keywords:               |         Parent:                  
   Points:               |   Actualpoints:                  
-------------------------+--------------------------------------------------

Comment(by Sebastian):

 Thanks for reminding me about the gzip, I got the following:

 For Linux (note that I didn't manage to compile openssl with -ffunction-
 sections -fdata-sections here, probably because I didn't try hard enough.
 so only zlib and libevent are using that option). This leads to a binary
 that is 150kB smaller when stripped and gzip'd, a space safe of a little
 over 5%.

 For OS X, the -ffunction-sections and -fdata-section options aren't
 necessary, you just add -dead_strip to LDFLAGS. Here I got 150kB in
 savings for the stripped and gzip'd binaries, that's over 10%. All in all,
 I think it's still worth it because it isn't very hard to implement (at
 least on OS X, openssl on linux/windows might be harder. Not sure).

 To answer Jake's question: yes, sure. We should use it for all our
 binaries if we can.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2915#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list