diff options
author | Martin Thomson <martin.thomson@gmail.com> | 2017-04-18 20:59:28 +1000 |
---|---|---|
committer | Martin Thomson <martin.thomson@gmail.com> | 2017-04-18 20:59:28 +1000 |
commit | 7216c47049a6a7c0e7e8163bffe38374a43e3f51 (patch) | |
tree | 2e94192095d731b58c5360e411c8bddcf48dcd04 /coreconf | |
parent | 11b0f6253d3451860fb5b81ef5ab9840daaccce3 (diff) | |
download | nss-hg-7216c47049a6a7c0e7e8163bffe38374a43e3f51.tar.gz |
Bug 1357216 - Ensure that the stack is not executable, r=franziskus
Diffstat (limited to 'coreconf')
-rw-r--r-- | coreconf/Linux.mk | 2 | ||||
-rw-r--r-- | coreconf/config.gypi | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/coreconf/Linux.mk b/coreconf/Linux.mk index dde68c67c..bb9db413b 100644 --- a/coreconf/Linux.mk +++ b/coreconf/Linux.mk @@ -148,7 +148,7 @@ DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections # against the libsanitizer runtime built into the main executable. ZDEFS_FLAG = -Wl,-z,defs DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) -LDFLAGS += $(ARCHFLAG) +LDFLAGS += $(ARCHFLAG) -z noexecstack # On Maemo, we need to use the -rpath-link flag for even the standard system # library directories. diff --git a/coreconf/config.gypi b/coreconf/config.gypi index bdc8f154b..336f795ac 100644 --- a/coreconf/config.gypi +++ b/coreconf/config.gypi @@ -356,6 +356,9 @@ 'cflags_cc': [ '-std=c++0x', ], + 'ldflags': [ + '-z', 'noexecstack', + ], 'conditions': [ [ 'target_arch=="ia32"', { 'cflags': ['-m32'], |