UPX

In looking again at Free Pascal/Lazarus I see in my notes where I used upx (and also strip) to reduce the size of Lazarus executables. Strip was already on my system…but upx wasn’t. It’s not in any repository. But a ready to run executable was available.

The scoreboard executable was 27.6 MB. After strip alone it is 6.9 MB. After upx alone it was 6.7 MB. After strip+upx (in that order) it was 1.9 MB. If you try upx+strip (in that order) strip says “strip: error: the input file ‘scoreboard’ has no sections” and the file remains at 6.7MB.

So clearly to get the smallest executable the procedure is strip then upx

I should have searched my own log file because I basically already said this!