Lets compare c and go: Hello_world.c :
#include
int main(){
printf(\"Hello world!\");
}
Hello_world.go:
You should get goupx, it will "fix" Golang ELF executables to work with upx
. I've already got around 78% file size shrink in some cases ~16MB >> ~3MB
.
Compression ratio usually tends to 25%, so it's worth a try:
$ go get github.com/pwaller/goupx
$ go build -o filename
$ goupx filename
>>
2014/12/25 10:10:54 File fixed!
File size Ratio Format Name
-------------------- ------ ----------- -----------
16271132 -> 3647116 22.41% linux/ElfAMD filename
Packed 1 file.
EXTRA: -s
flag (strip) can shrink bin file even more goupx -s filename