From e9e2116491354ffdf3b216d485fd08d95fc0fc4f Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Mon, 14 Apr 2014 16:27:17 -0700 Subject: [4.9] Enable assembler linker default for security See 5c602438be54c0802c21b299ab8bd94efbfc0c70 and 7e66b0108987a56a58c6150672fe7cf8cf88e69a Change-Id: I674ca1da71a1c41024057b66613a875aac97f99a --- gcc-4.9/gcc/config/linux-android.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc-4.9/gcc/config/linux-android.h') 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}" -- cgit v1.2.3