[fpc-pascal] Why win64 program are considerably bigger in exe size than win 32?
pascaldragon at googlemail.com
Sun Dec 31 11:15:05 CET 2017
Am 31.12.2017 00:19 schrieb "Martok" <listbox at martoks-place.de>:
Am 22.12.2017 um 09:30 schrieb Dennis:
> I am upgrading my program from win 32 to win 64 using the new Lazarus 1.8.
> I discovered my program exe size increased from 6M to 9M.
Just for fun, I wrote a small program to parse Linker Map files and show the
image occupation by source object file (~unit).
Could/would you provide that tool as open source? Does it only work with
PE/COFF or also ELF?
First lesson: FPC's internal linker is *a lot* better than the GNU linker
it comes to discarding unused parts. Good job there!
Good to know :D
Second lesson: the RTL's system and classes are large, compared to Delphi
least older versions). They can do more as well, so I'll call that a draw.
And now the on-topic part: this compares an "empty" project (Lazarus:
Project->New->Program), compiled for win32 and win64
As you can see, the win64 image is about a third larger - but not so much
because of the code segments (they end shortly after the cyan "bar" for
before the second occurrence of classes), but more so because of the data
sections following. A lot of that is unwind info (.xdata), I'm afraid I
know what .pdata usually is.
.xdata and .pdata are both used for SEH related data on the non-i386
Windows platforms (x84_64 and ARM as well as the obsolete MIPS and PowerPC
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal