Bug 567134: turn on -dynamicbase for optimized Windows NSS builds. r=khuey.

This commit is contained in:
Wan-Teh Chang 2010-07-21 17:13:16 -07:00
Родитель 9f34737563
Коммит 574e3a4881
3 изменённых файлов: 27 добавлений и 1 удалений

Просмотреть файл

@ -131,7 +131,7 @@ else # !NS_USE_GCC
OPTIMIZER += -O2
endif
DEFINES += -UDEBUG -U_DEBUG -DNDEBUG
DLLFLAGS += -OUT:"$@"
DLLFLAGS += -DYNAMICBASE -OUT:"$@"
ifdef MOZ_DEBUG_SYMBOLS
OPTIMIZER += -Zi -Fd$(OBJDIR)/
DLLFLAGS += -DEBUG -OPT:REF

Просмотреть файл

@ -1,2 +1,6 @@
This directory contains patches that were added locally
on top of the NSS release.
File: msvc-aslr.patch
https://bugzilla.mozilla.org/show_bug.cgi?id=567134
Use the -DYNAMICBASE linker option to enable ASLR on Windows.

Просмотреть файл

@ -0,0 +1,22 @@
diff --git a/security/coreconf/WIN32.mk b/security/coreconf/WIN32.mk
--- a/security/coreconf/WIN32.mk
+++ b/security/coreconf/WIN32.mk
@@ -126,17 +126,17 @@ else # !NS_USE_GCC
ifdef BUILD_OPT
OS_CFLAGS += -MD
ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
OPTIMIZER += -O1
else
OPTIMIZER += -O2
endif
DEFINES += -UDEBUG -U_DEBUG -DNDEBUG
- DLLFLAGS += -OUT:"$@"
+ DLLFLAGS += -DYNAMICBASE -OUT:"$@"
ifdef MOZ_DEBUG_SYMBOLS
OPTIMIZER += -Zi -Fd$(OBJDIR)/
DLLFLAGS += -DEBUG -OPT:REF
LDFLAGS += -DEBUG -OPT:REF
endif
else
#
# Define USE_DEBUG_RTL if you want to use the debug runtime library