Skip to content

Commit

Permalink
Merge 'aslr' into HEAD
Browse files Browse the repository at this point in the history
Address Space Layout Randomization (ASLR) allows executables' memory
layout to change at random between runs, and therefore offers a quite
decent protection against many attacks.

We enable ASLR because MSYS2's C compiler offers support for ASLR, and
whatever performance impact it has is neglible, according to
https://insights.sei.cmu.edu/cert/2014/02/differences-between-aslr-on-windows-and-linux.html

This merges the part of #612
that does not break Git ;-)

This fixes #608

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed May 20, 2016
2 parents f0ef8a9 + 3525f9e commit 836926e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config.mak.uname
Original file line number Diff line number Diff line change
Expand Up @@ -544,11 +544,17 @@ else
ifeq ($(shell expr "$(uname_R)" : '2\.'),2)
# MSys2
prefix = /usr/
# Enable DEP
BASIC_LDFLAGS += -Wl,--nxcompat
# Enable ASLR
BASIC_LDFLAGS += -Wl,--dynamicbase
ifeq (MINGW32,$(MSYSTEM))
prefix = /mingw32
BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup
endif
ifeq (MINGW64,$(MSYSTEM))
prefix = /mingw64
BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
else
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
BASIC_LDFLAGS += -Wl,--large-address-aware
Expand Down

0 comments on commit 836926e

Please sign in to comment.