[fpc-devel] Some questions about compiler work on x86_64-win64
Sven Barth
pascaldragon at googlemail.com
Fri Mar 17 10:56:47 CET 2017
Am 17.03.2017 08:08 schrieb "Bishop via fpc-devel" <
fpc-devel at lists.freepascal.org>:
>
> I have some questions about compiler work on x86_64-win64.
>
> 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?
Correct.
> 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?
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...
> 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?
Same as above.
> 4) Why referencing to global variable under Windows all time compiled
like RIP-related, even if no Generate-PIC enable (on Linux work fine)?
I might remember it incorrectly, but I think that Microsoft says that all
accesses should be RIP relative to reduce the need for relocations.
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170317/242c134f/attachment.html>
More information about the fpc-devel
mailing list