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 7:53

>>9
WTF? AFAIK MSVC only outputs PEs, but you're targeting Linux?
It's complicated.
I'm used to my Win build environnment with Visual studio.
The Tor dependencies (LibEvent,ZLib,OpenSSL) are compiled with gcc/mingw and linked static.
All the code that is NOT using syscalls directly is built with MSVC, it's the majority of the code I write. Instead this code is calling portable wrapper functions.
The OS-dependant code (for netcode, file IO,..) is built separately with gcc/mingw as a statically-linked lib, it's just a wrapper that calls system APIs with #ifdefs.
Then I plan on cross-compiling the OS-dependant libs and linking with the MSVC code. Plan on, because I'm still testing the code on Win.
Thus I can write most of the code in Visual, and still cross-compile.

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