<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">Am 31.12.2017 00:19 schrieb "Martok" <<a href="mailto:listbox@martoks-place.de" target="_blank">listbox@martoks-place.de</a>>:<br type="attribution"><blockquote class="m_4974248374321031431quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_4974248374321031431quoted-text">Am 22.12.2017 um 09:30 schrieb Dennis:<br>
> I am upgrading my program from win 32 to win 64 using the new Lazarus 1.8.<br>
> I discovered my program exe size increased from 6M to 9M.<br>
</div>Just for fun, I wrote a small program to parse Linker Map files and show the<br>
image occupation by source object file (~unit).<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Could/would you provide that tool as open source? Does it only work with PE/COFF or also ELF? </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_4974248374321031431quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
First lesson: FPC's internal linker is *a lot* better than the GNU linker when<br>
it comes to discarding unused parts. Good job there!<br>
<<a href="http://puu.sh/yR3WX/780bcea8f1.png" rel="noreferrer" target="_blank">http://puu.sh/yR3WX/780bcea8f<wbr>1.png</a>><br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Good to know :D</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_4974248374321031431quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Second lesson: the RTL's system and classes are large, compared to Delphi (at<br>
least older versions). They can do more as well, so I'll call that a draw.<br>
<br>
And now the on-topic part: this compares an "empty" project (Lazarus:<br>
Project->New->Program), compiled for win32 and win64<br>
<<a href="http://puu.sh/yR0Qs/6e26a74cc9.png" rel="noreferrer" target="_blank">http://puu.sh/yR0Qs/6e26a74cc<wbr>9.png</a>><br>
As you can see, the win64 image is about a third larger - but not so much<br>
because of the code segments (they end shortly after the cyan "bar" for typinfo,<br>
before the second occurrence of classes), but more so because of the data<br>
sections following. A lot of that is unwind info (.xdata), I'm afraid I don't<br>
know what .pdata usually is.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">.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 targets). </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div></div>