05.08.2014 22:02, Sven Barth пишет:
Am 05.08.2014 15:35 schrieb "Marco van de Voort" <mar...@stack.nl 
<mailto:mar...@stack.nl>>:
 > But the FPC version has these symbols in the main program, maybe you must
 > make sure that those (operatingsystem*) systems are available from the
 > mainprogram too and preloaded with the proper values.

The main program should not need to do anything here. It's more likely that 
there is a problem in
our FreeBSD startup files for libraries.

FreeBSD loader does not pass argc,argv and envp to shared library initialization procedure, like it happens on Linux. Since FPC does not have a shared RTL, such hack with exporting symbols from executable is likely an only way to initialize RTLs compiled into shared libraries.

However starting from version 9.2 IIRC, FreeBSD loader looks more like Linux one, but it passes argc,argv and envp only to initialization procedures pointed at by DT_INIT_ARRAY, not to one pointed at by DT_INIT. I.e. fixing the issue requires changes to startup files/link scripts and means that no support for versions <9.2 will be available.

Regards,
Sergei


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to