aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/config/linux-android.h
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-04-14 16:27:17 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2014-04-22 15:28:40 -0700
commite9e2116491354ffdf3b216d485fd08d95fc0fc4f (patch)
tree1ba4dddd7b128d7e7fa1fb610f903c1ba4a6343f /gcc-4.9/gcc/config/linux-android.h
parent856eafd6efe251c00d0fcc9e60d37ad83032060c (diff)
downloadtoolchain_gcc-e9e2116491354ffdf3b216d485fd08d95fc0fc4f.tar.gz
toolchain_gcc-e9e2116491354ffdf3b216d485fd08d95fc0fc4f.tar.bz2
toolchain_gcc-e9e2116491354ffdf3b216d485fd08d95fc0fc4f.zip
[4.9] Enable assembler linker default for security
See 5c602438be54c0802c21b299ab8bd94efbfc0c70 and 7e66b0108987a56a58c6150672fe7cf8cf88e69a Change-Id: I674ca1da71a1c41024057b66613a875aac97f99a
Diffstat (limited to 'gcc-4.9/gcc/config/linux-android.h')
-rw-r--r--gcc-4.9/gcc/config/linux-android.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/config/linux-android.h b/gcc-4.9/gcc/config/linux-android.h
index 26f1a74fd..42e061716 100644
--- a/gcc-4.9/gcc/config/linux-android.h
+++ b/gcc-4.9/gcc/config/linux-android.h
@@ -38,7 +38,7 @@
"%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}"
#define ANDROID_LINK_SPEC \
- "%{shared: -Bsymbolic}"
+ "%{shared: -Bsymbolic} -z noexecstack -z relro -z now"
#define ANDROID_CC1_SPEC \
"%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \
@@ -48,6 +48,9 @@
"%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \
"%{!frtti:%{!fno-rtti: -fno-rtti}}"
+#define ANDROID_ASM_SPEC \
+ "--noexecstack"
+
#define ANDROID_LIB_SPEC \
"%{!static: -ldl}"