develooper Front page | perl.perl5.porters | Postings from June 2013

Re: Include the Win32 extension in the ALL_STATIC build on Win32

Thread Previous | Thread Next
From:
bulk88
Date:
June 9, 2013 14:52
Subject:
Re: Include the Win32 extension in the ALL_STATIC build on Win32
Message ID:
BLU0-SMTP34871A3A16BDB935C2DC653DF9B0@phx.gbl
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About