<p>Am 17.03.2017 08:08 schrieb "Bishop via fpc-devel" <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>>:<br>
><br>
> I have some questions about compiler work on x86_64-win64.<br>
><br>
> 1) EXE-file contained .CRT section. As i understand it contained one pointer to _FPC_Tls_Callback functions from RTL. Is it used only for this?</p>
<p>Correct.</p>
<p>> 2) Why INITFINAL table on both Windows and Linux puted to .data section? Is we need to change it in time of app run? Or even possible it must be evicted and replace just with call instructions? I mean autogeneration of fpc_InitializeUnits and fpc_FinalizeUnits?</p>
<p>It probably should be .rdata, but I think that older binutils had problems with that, thus they were put into .data and that was never changed till now...</p>
<p>> 3) Why .fpc.n_version puted to .data section? Is we need change it on runtime? Possible must be in .rdata? On linux it is entyre section for it, does this is necessary?</p>
<p>Same as above.</p>
<p>> 4) Why referencing to global variable under Windows all time compiled like RIP-related, even if no Generate-PIC enable (on Linux work fine)?</p>
<p>I might remember it incorrectly, but I think that Microsoft says that all accesses should be RIP relative to reduce the need for relocations.</p>
<p>Regards,<br>
Sven</p>