Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Reduce size of compiled binary

Name: Anonymous 2013-07-22 4:36

Hey /prog/, I'm making a remote control tool that works over Tor  because reasons.
But Tor itself weights 3Mio and my final executable is over 1Mio upx'd.
I'm compiling in plain C with Visual'12, have activated all the size optimisation but it's not enough. The client must be able to transfer itself over the network very fast and fit even on small embeded systems.

So do you know of any methods to reduce size further, or any packer better than UPX ? I don't care if it makes my code really slow, but size is critical.

Name: Anonymous 2013-07-22 11:42

>>13
¶1 It is a specific standard we use to make applications small, and it uses a UPX bin compressor:
http://portableapps.com/apps/utilities/portableapps.com_appcompactor
That's why you need our specifications, since we make them even smaller with other calls. And again, this is only for Windows. But it is fine you are using UPX.

¶2 You are welcome to output the C code to be able to decipher some of the OPcode:
http://panthema.net/2013/0124-GCC-Output-Assembler-Code/
http://www.delorie.com/djgpp/v2faq/faq8_20.html
http://24alpha.wordpress.com/2007/12/18/how-to-get-gcc-to-interleave-assembly-output-with-original-source-code/

And then make a repository for other to take a look. I am interested in the project, as you can tell.

¶3 That's fine. It shouldn't be that hard, since the call the SSL wrapper functions separate as modules:
https://gitweb.torproject.org/tor.git/blob/refs/heads/master:/src/common/crypto.c
https://gitweb.torproject.org/tor.git/blob/refs/heads/master:/src/common/crypto.h

  27 #include <openssl/err.h>
  28 #include <openssl/rsa.h>
  29 #include <openssl/pem.h>
  30 #include <openssl/evp.h>
  31 #include <openssl/engine.h>
  32 #include <openssl/rand.h>
  33 #include <openssl/opensslv.h>
  34 #include <openssl/bn.h>
  35 #include <openssl/dh.h>
  36 #include <openssl/conf.h>
  37 #include <openssl/hmac.h>

and libev for the network events:
https://gitweb.torproject.org/tor.git/blob/refs/heads/master:/src/common/compat_libevent.c
https://gitweb.torproject.org/tor.git/blob/refs/heads/master:/src/common/compat_libevent.h

¶4 IDE? Why do you need one? Is gvim, emacs, heck even notepadd++, with gdb and Valgrind not enough? If you are mentally handicapped for one, use:
http://www.bloodshed.net/dev/devcpp.html
http://wxdsgn.sourceforge.net/

The only one I used (thanks to stupid professor) was Geany. You are welcome to use that. There are more:
http://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments#C.2FC.2B.2B

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List