[libunwind] Fix executable stack directive on Linux.
authorManoj Gupta <manojgupta@google.com>
Tue, 16 May 2017 20:18:57 +0000 (20:18 +0000)
committerManoj Gupta <manojgupta@google.com>
Tue, 16 May 2017 20:18:57 +0000 (20:18 +0000)
Summary:
Disable executable stack on Linux. Also remove redundant Android check
as it is covered by Android.

Reviewers: phosek, compnerd, rs, rmaprath, EricWF, krytarowski

Reviewed By: krytarowski

Subscribers: srhines, llvm-commits, krytarowski

Differential Revision: https://reviews.llvm.org/D33217

llvm-svn: 303206

libunwind/src/assembly.h

index 9fb9905..d28cbc9 100644 (file)
@@ -47,8 +47,8 @@
 #define SYMBOL_IS_FUNC(name) .type name,@function
 #endif
 
-#if defined(__GNU__) || defined(__ANDROID__) || defined(__FreeBSD__) || \
-    defined(__Fuchsia__)
+#if defined(__GNU__) || defined(__FreeBSD__) || defined(__Fuchsia__) || \
+    defined(__linux__)
 #define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits
 #else
 #define NO_EXEC_STACK_DIRECTIVE