From fb953ad4077a4a0f7b8204f52f3ce71feca190d2 Mon Sep 17 00:00:00 2001 From: Tomasz Konojacki Date: Thu, 23 Jan 2020 02:06:17 +0100 Subject: win32: don't set the base address of perl5xx.dll It was causing LNK4281 warning on modern Visual C++ versions. Also, -base is a security risk because it opt-outs from ASLR. That switch was added as an optimization 20 years ago, but I don't think the potential benefits are worth the trouble. --- win32/GNUmakefile | 2 +- win32/Makefile | 2 +- win32/makefile.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'win32') diff --git a/win32/GNUmakefile b/win32/GNUmakefile index 211e30c337..1429393346 100644 --- a/win32/GNUmakefile +++ b/win32/GNUmakefile @@ -1572,7 +1572,7 @@ ifeq ($(CCTYPE),GCC) else $(LINK32) -dll -out:$@ $(BLINK_FLAGS) \ @Extensions_static \ - -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \ + $(DELAYLOAD) $(LIBFILES) \ $(PERLDLL_RES) $(PERLDLL_OBJ) $(PERLEXPLIB) $(EMBED_DLL_MANI) endif diff --git a/win32/Makefile b/win32/Makefile index 6e9eceb41b..20beecb0b1 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1130,7 +1130,7 @@ perldll.def : $(MINIPERL) $(CONFIGPM) ..\embed.fnc ..\makedef.pl create_perllibs CCTYPE=$(CCTYPE) TARG_DIR=..\ > perldll.def $(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static - $(LINK32) -dll -def:perldll.def -base:0x28000000 -out:$@ @Extensions_static @<< + $(LINK32) -dll -def:perldll.def -out:$@ @Extensions_static @<< $(BLINK_FLAGS) $(DELAYLOAD) $(LIBFILES) $(PERLDLL_OBJ) $(PERLDLL_RES) << $(EMBED_DLL_MANI) diff --git a/win32/makefile.mk b/win32/makefile.mk index cb7ce50f4f..b0be491459 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1498,7 +1498,7 @@ $(PERLDLL): $(PERLEXPLIB) $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static .ELSE $(LINK32) -dll -out:$@ $(BLINK_FLAGS) \ @Extensions_static \ - @$(mktmp -base:0x28000000 $(DELAYLOAD) $(LIBFILES) \ + @$(mktmp $(DELAYLOAD) $(LIBFILES) \ $(PERLDLL_RES) $(PERLDLL_OBJ) $(PERLEXPLIB)) $(EMBED_DLL_MANI) .ENDIF -- cgit v1.2.1