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 14:19

>>20

>No compiler flags are going to make an appreciable difference
I need every Kio I can get. Off course there's a limit, but MSVC with no optimisation/fast compilation makes a 4.7Mio exe. With size optimisations it gets down to 2618Kio, and with UPX ultra-brute down to 894Kio.

>>Remove all unneeded functionality from your libraries
I'm doing this right now. But this is dangerous waters. Just removing unreferenced functions is the job of the linker. But removing a functionnality is not so easy when you have hundreds of interdependant files. Thankfully Tor is kinda-clean c. But it's still a pain.

>> remove libraries in favour of OS-provided functionality
I'm targetting embedded systems too. With embedded meaning "We removed all the OS-provided functionnality we could" it's a bit tricky.

>Refactor your application into an OS-independent core library ... and OS-dependent functionality in an OS-dependent way
>rather than ... abstraction layers
Please explain the difference between an OS abstraction layer and separating OS-independant and OS-dependant code. I'm not sure what you're trying to say here. I already separate the OS-independant code -- the one I compiled with msvc -- into a lib.

>>21
>gvim, emacs, and Notepad++ with gbd and Valgrind
That's 6 different tools. And I'm counting emacs as only one tool here.
That's why people made IDE. A consistent, ready to use, gui to the underlying stuff. Of course I could bake a linux build environnment with a full-custom emacs. But that's not what I'm trying to do.

>anycast
>ipsec
Seriously ? If it was this simple, do you really think people like dread pirate roberts would bother with Tor ?
I need both encryption and anonymity of all the clients and servers. The Tor routing model is exactly what I want. Routing my encrypted traffic through a circuit of randomly picked anons. No one knows what I'm sending, and no one can know the source and the hidden service's rendezvous point at the same time.

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