aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-05-19 16:45:27 +0900
committerJunio C Hamano <gitster@pobox.com>2019-05-19 16:45:27 +0900
commitf42bee7d51af9c339dfad8e854149810c34fb7d3 (patch)
tree3c43bdd991b74706ef32dfa6aeb0a2f3e37c74a2
parentMerge branch 'ab/trace2-typofix' (diff)
parentmingw: enable DEP and ASLR (diff)
downloadgit-f42bee7d51af9c339dfad8e854149810c34fb7d3.tar.gz
git-f42bee7d51af9c339dfad8e854149810c34fb7d3.zip
Merge branch 'id/windows-dep-aslr'
Allow DEP and ASLR for Windows build to for security hardening. * id/windows-dep-aslr: mingw: enable DEP and ASLR mingw: do not let ld strip relocations
-rw-r--r--config.mak.uname8
1 files changed, 8 insertions, 0 deletions
diff --git a/config.mak.uname b/config.mak.uname
index 19ce2f296a..b71688eeb7 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -576,13 +576,21 @@ else
ifneq ($(shell expr "$(uname_R)" : '1\.'),2)
# MSys2
prefix = /usr/
+ # Enable DEP
+ BASIC_LDFLAGS += -Wl,--nxcompat
+ # Enable ASLR (unless debugging)
+ ifneq (,$(findstring -O,$(filter-out -O0 -Og,$(CFLAGS))))
+ BASIC_LDFLAGS += -Wl,--dynamicbase
+ endif
ifeq (MINGW32,$(MSYSTEM))
prefix = /mingw32
HOST_CPU = i686
+ BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup
endif
ifeq (MINGW64,$(MSYSTEM))
prefix = /mingw64
HOST_CPU = x86_64
+ BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup
else
COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
BASIC_LDFLAGS += -Wl,--large-address-aware
licy dr...Jason Baron1-0/+6 2013-12-22cpufreq: remove sysfs files for CPUs which failed to come back after resumeViresh Kumar1-32/+31 2013-12-21aio/migratepages: make aio migrate pages saneBenjamin LaHaise3-15/+53 2013-12-21aio: fix kioctx leak introduced by "aio: Fix a trinity splat"Benjamin LaHaise1-1/+2 2013-12-21null_blk: support submit_queues on use_per_node_hctxMatias Bjørling1-4/+35 2013-12-21null_blk: set use_per_node_hctx param to falseMatias Bjørling2-6/+7 2013-12-21null_blk: corrections to documentationMatias Bjørling1-10/+10 2013-12-20Don't set the INITRD_COMPRESS environment variable automaticallyLinus Torvalds1-1/+3 2013-12-20mm: fix build of split ptlock codeOlof Johansson1-1/+1 2013-12-20pstore: Don't allow high traffic options on fragile devicesLuck, Tony4-2/+10 2013-12-20mm: do not allocate page->ptl dynamically, if spinlock_t fits to longKirill A. Shutemov5-7/+8 2013-12-20mm: page_alloc: revert NUMA aspect of fair allocation policyJohannes Weiner1-10/+9 2013-12-20Revert "mm: page_alloc: exclude unreclaimable allocations from zone fairness ...Mel Gorman1-2/+1 2013-12-20mm: Fix NULL pointer dereference in madvise(MADV_WILLNEED) supportKirill A. Shutemov1-3/+2 2013-12-20IB/uverbs: Check access to userspace response buffer in extended commandYann Droneaud1-0/+5 2013-12-20IB/uverbs: Check input length in flow steering uverbsYann Droneaud1-0/+6 2013-12-20IB/uverbs: Set error code when fail to consume all flow_spec itemsYann Droneaud1-0/+1 2013-12-20IB/uverbs: Check reserved fields in create_flowYann Droneaud1-0/+7 2013-12-20IB/uverbs: Check comp_mask in destroy_flowYann Droneaud1-0/+3 2013-12-20IB/uverbs: Check reserved field in extended command headerYann Droneaud1-0/+3 2013-12-20IB/uverbs: New macro to set pointers to NULL if length is 0 in INIT_UDATA()Roland Dreier2-11/+16 2013-12-20ext4: add explicit casts when masking cluster sizesTheodore Ts'o3-17/+25 2013-12-19drm/radeon: fix asic gfx values for scrapper asicsAlex Deucher1-4/+16 2013-12-19qla2xxx: Fix scsi_host leak on qlt_lport_register callback failureNicholas Bellinger1-0/+1 2013-12-19target: Remove extra percpu_ref_initAndy Grover1-7/+1 2013-12-19x86/efi: Don't select EFI from certain special ACPI driversJan Beulich5-6/+5 2013-12-19x86 idle: Repair large-server 50-watt idle-power regressionLen Brown2-1/+5 2013-12-19libata, freezer: avoid block device removal while system is frozenTejun Heo2-0/+27 2013-12-19arm64: ptrace: avoid using HW_BREAKPOINT_EMPTY for disabled eventsWill Deacon1-20/+18 2013-12-19null_blk: warning on ignored submit_queues paramMatias Bjorling1-2/+5 2013-12-19null_blk: refactor init and init errors code pathsMatias Bjorling1-25/+38