Konovalov, Vadim (Vadim)** CTR ** wrote: >> From: Steve Hay >> On 8 June 2013 20:54, Konovalov, Vadim wrote: >>> what a point of exporting functions from an .exe >> Yes, but we have to export init_Win32CORE for the GetProcAddress() >> call in Perl_init_os_extras() to succeed. > > of course... correct... > any XS module must use API functions normally obtained from DLL, in case of > static linked executable - from EXE. > > Cool if this is indeed possible, and kudos for solving these problems :) > > Vadim. Yes, but, using GetProcAddress is a hack. All function calls within the same binary should be static linked. BUT, to implement static XS linking Dynaloader does hook GetProcAddress on Dynaloader's public perl API side at http://perl5.git.perl.org/perl.git/blob/HEAD:/ext/DynaLoader/dl_win32.xs#l68 and checks with a static list in the perl binary whether a module exists as static linked XS before going to the OS's DLL loader.Thread Previous | Thread Next