Sven Barth via fpc-devel wrote:
Adriaan van Os via fpc-devel <fpc-devel@lists.freepascal.org
<mailto:fpc-devel@lists.freepascal.org>> schrieb am Di., 29. Okt. 2024,
15:47:
The idea of building the RTL in a dynamic ibrary is to have one copy
of the RTL threadvars, notably
one copy of the _ExceptObjectStack threadvar. Will this still be
true if a main program and a
dynamic library both include sysinit.o ?
The sysinit unit contains the entrypoint and directly references symbols
provided by the main program, not the RTL, to pass them into the RTL. It
simply can't be inside a library. The exception handling is inside the
System and SysUtils units, so no conflict there.
sysinit.o contains _FPC_LIBMAIN and thus has to be linked in when creating a dynamic library
compiled with FPC. The crucial question is — do we then end up with one or two copies of the
_ExceptObjectStack threadvar ?
Regards,
Adriaan van Os
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel