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 10:17

>>9
.dso is nearly the same concept as Windows' DLL. Plus, as we both know, he can embed the the libraries in the ELFormat.

>>10
If we knew your target was Windows, I could have offered you this:
http://portableapps.com/development
In particular the AppCompactor.

If you have a Windows build environnment, you will need to a compiler that can do more than PE, so you will need to get MinGW or Cygwin, to build in ELF.

Cudder is correct, that if you want to scale the size of a client to something smaller than 1MB, you will need to rewrite it in ASM since there's bound lots of unnecessary instructions. Assuming you have experience in ASM, You can just take out much of the fluff in the code. I assume it has lots of it since it uses zlib instead of xz. Actually is the only reason zlib is used to compress the program itself, or does it need it for something else in the tor specification?:
https://gitweb.torproject.org/torspec.git?a=blob_plain;hb=HEAD;f=tor-spec.txt

glancing over it, it does not seem so, so you can get away with only libev and CyaSSL, and miniz if you need to compress the program files and/or itself. I assume you are making your application semi-Posix compliant, right⸮

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