aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/config/linux-android.h
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2013-04-02 18:50:36 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2013-04-02 19:01:03 +0800
commit5c602438be54c0802c21b299ab8bd94efbfc0c70 (patch)
treec3b72d35b5c5e42c7f95b32870d2663cbdba2f63 /gcc-4.8/gcc/config/linux-android.h
parent6ce5868afdf35ad36ca451492fa0541e881d4938 (diff)
downloadtoolchain_gcc-5c602438be54c0802c21b299ab8bd94efbfc0c70.tar.gz
toolchain_gcc-5c602438be54c0802c21b299ab8bd94efbfc0c70.tar.bz2
toolchain_gcc-5c602438be54c0802c21b299ab8bd94efbfc0c70.zip
[4.8] Enable assembler linker default for security
Used to be local NDK patch at $NDK/build/tools/toolchain-patches/ gcc/0009-Enable-assembler-linker-default-for-security.patch See 7e66b0108987a56a58c6150672fe7cf8cf88e69a Change-Id: Ia668c962b7251dd673cc028dac8a111b1aeeb47d
Diffstat (limited to 'gcc-4.8/gcc/config/linux-android.h')
-rw-r--r--gcc-4.8/gcc/config/linux-android.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc-4.8/gcc/config/linux-android.h b/gcc-4.8/gcc/config/linux-android.h
index 2c87c846c..c97b9b765 100644
--- a/gcc-4.8/gcc/config/linux-android.h
+++ b/gcc-4.8/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}"