[Lazarus] How to strip debug symbols from exe file?

Kostas Michalopoulos badsectoracula at gmail.com
Sun Dec 31 17:07:01 CET 2017


UPX compressed executables need more memory since normally the OS will load
code pages on demand and only code that is actually executed is loaded from
the executable, whereas UPX forces the entire executable to be in memory.
Moreover UPX prevents the OS to share the code between different instances
of the program - that means if you run a 10MB program twice, with UPX
you'll use 20MB whereas without UPX you'll only use 10MB. Similarly the OS
can cache the executable between runs, so by UPXing it you lose that too.

There isn't really much of a reason to compress executables nowadays, the
idea is a relic from the days of floppy disks and sub-GB hard drives. Today
they actually do more harm than good and only give a fake feel of
compactness.

There is only one case where they might be justified and this is
downloading the executable by itself off the Internet. This can save
bandwidth with UPX's --lzma compression (at the cost of memory) but this is
of marginal worth and only if you are distribution a single executable
without any other files. In any other case you are better off compressing
the entire program and its data files in a solid archive like .7z or
.tar.xz or with a setup program that support LZMA compression. This will
actually create smaller files for download.


On Sun, Dec 31, 2017 at 11:08 AM, coppolastudio via Lazarus <
lazarus at lists.lazarus-ide.org> wrote:

> upx zip the executable. about false positves I never got this troubles
> with my few files and free av like Avira or AVG, regards
>
> Inviato tramite il client di Posta WPS
> Il Graeme Geldenhuys via Lazarus <lazarus at lists.lazarus-ide.org>,
> 30/dic/2017 08:28 PM ha scritto:
>
> On 2017-12-30 15:16, coppolastudio via Lazarus wrote:
> > furthermore you can pack the executable with upx
>
> That shouldn't be needed if debugging information is excluded from the
> executable. Also from what I remember (years back), Windows anti-virus
> software hated UPX compressed executables - giving tons of false positives.
>
> Regards,
>    Graeme
>
> --
> fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
> http://fpgui.sourceforge.net/
>
> My public PGP key:  http://tinyurl.com/graeme-pgp
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20171231/7616ac78/attachment.html>


More information about the Lazarus mailing list