From dd601292373e88ff6bdff128f8f4614c8e1f31af Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Thu, 29 Sep 2016 18:37:23 +0900 Subject: [PATCH] Apply ASLR Change-Id: If0d83ce45ff6ba324a94fc8bb2f67ae4c8003465 --- common.gypi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index 7d7715e..ced418c 100644 --- a/common.gypi +++ b/common.gypi @@ -61,7 +61,8 @@ 'v8_enable_handle_zapping': 1, }, 'defines': [ 'DEBUG', '_DEBUG' ], - 'cflags': [ '-g', '-O0' ], + 'cflags': [ '-g', '-O0', '-fPIE' ], + 'ldflags': [ '-pie' ], 'conditions': [ ['target_arch=="x64"', { 'msvs_configuration_platform': 'x64', @@ -91,7 +92,8 @@ 'variables': { 'v8_enable_handle_zapping': 0, }, - 'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections' ], + 'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections', '-fPIE' ], + 'ldflags': [ '-pie' ], 'conditions': [ ['target_arch=="x64"', { 'msvs_configuration_platform': 'x64', -- 2.7.4