stop Win32 VC miniperl from exporting functions
authorDaniel Dragan <bulk88@hotmail.com>
Thu, 11 Oct 2012 05:47:19 +0000 (01:47 -0400)
committerSteve Hay <steve.m.hay@googlemail.com>
Thu, 11 Oct 2012 07:22:11 +0000 (08:22 +0100)
commita19baa613c9769701790afd2f9ebfc422a1e97e7
tree1a1c651ec0523caf056785ed46f410d229e3eb75
parent98c015b7a9b5140b2750b25518eb68b5024d7652
stop Win32 VC miniperl from exporting functions

miniperl.exe does not load XS modules. It has no reason to export anything.
About 130 things are exported by VC Win32 miniperl. 90% of them are
the win32_* functions. All but a couple Perl_* exports are gone in the
exporting miniperl. See perl #115216 for the full list of accidentally
exported items. Also stop trying to find Win32CORE's boot function in
Perl_init_os_extras through the export table. It is not exported and not
in the miniperl image and GetProcAddress will never return not NULL. By
removing this GetProcAddress call, miniperl stops importing GetProcAddress
from kernel32 and a tiny bit startup time by miniperl during the full
perl build process. By removing the exports the compiler is free to use
more random (not cdecl) calling conventions and/or optimizing away code
than before. Also by removing the export entries, and the GetProcAddress
import, RO strings are removed from the miniperl image. This commit only
affects the VC miniperl. The Mingw miniperl remains unmodified except
for not trying to load Win32CORE through the export table and some of the
.c files being compiled with PERL_IS_MINIPERL when previously they were
not.
EXTERN.h
win32/Makefile
win32/makefile.mk
win32/win32.c
win32/win32.h