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: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2013-07-22 6:47

Try manually stripping out the fluff, and if that doesn't help, rewrite it in Asm.

Do NOT link with libc statically. Use /MD and link with MSVCRT.DLL. Use CyaSSL instead of OpenSSL, and rip out LibEvent - replace with WaitForMultipleObjects(). Replace zlib with http://code.google.com/p/miniz/ . If you're willing to assume that your client already has zlib/OpenSSL DLLs somewhere on the system, just replace them with code to search for and load them instead.

The optimised switches I use to merge sections/trim BSS/shrink the stub/reduce alignment/etc are only good if the binary is in the <64k range, as they only save a few K at most.

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