Skip to content
forked from pwaller/goupx

Fix golang compiled binaries on x86_64 so that they can be packed with UPX

Notifications You must be signed in to change notification settings

hilyjiang/goupx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

goupx - Fix golang ELF executables to work with upx

Installation: go get github.com/pwaller/goupx/

(or if you don't want to do it with root, GOPATH=${PWD}/env go get github.com/pwaller/goupx/ will install it to ${PWD}/env/bin/goupx)

Usage: goupx [filename]

Fixes the PT_LOAD offset of [filename] and then runs upx.

This is only necessary for ELF executable (not Mach-O executables, for example).

Based on code found on the upx bugtracker.

GPLv3 licensed.

Fixes the following issue

$ upx [go binary]
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2011
UPX 3.08        Markus Oberhumer, Laszlo Molnar & John Reiser   Dec 12th 2011

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
upx: goupx: EOFException: premature end of file                                

Packed 1 file: 0 ok, 1 error.

Typical compression ratio

Resulting filesizes are typically 25% of the original go executable. Your mileage my vary.

About

Fix golang compiled binaries on x86_64 so that they can be packed with UPX

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%