[libunwind] r278023 - Merging r277868:

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 8 10:18:56 PDT 2016


Author: hans
Date: Mon Aug  8 12:18:56 2016
New Revision: 278023

URL: http://llvm.org/viewvc/llvm-project?rev=278023&view=rev
Log:
Merging r277868:
------------------------------------------------------------------------
r277868 | compnerd | 2016-08-05 14:35:28 -0700 (Fri, 05 Aug 2016) | 4 lines

unwind: disable executable stacks

Similar to compiler-rt, ensure that we disable executable stacks for the custom
assembly.
------------------------------------------------------------------------

Modified:
    libunwind/branches/release_39/   (props changed)
    libunwind/branches/release_39/src/UnwindRegistersRestore.S
    libunwind/branches/release_39/src/UnwindRegistersSave.S
    libunwind/branches/release_39/src/assembly.h

Propchange: libunwind/branches/release_39/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug  8 12:18:56 2016
@@ -1 +1 @@
-/libunwind/trunk:276128
+/libunwind/trunk:276128,277868

Modified: libunwind/branches/release_39/src/UnwindRegistersRestore.S
URL: http://llvm.org/viewvc/llvm-project/libunwind/branches/release_39/src/UnwindRegistersRestore.S?rev=278023&r1=278022&r2=278023&view=diff
==============================================================================
--- libunwind/branches/release_39/src/UnwindRegistersRestore.S (original)
+++ libunwind/branches/release_39/src/UnwindRegistersRestore.S Mon Aug  8 12:18:56 2016
@@ -479,3 +479,6 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9li
    l.nop
 
 #endif
+
+NO_EXEC_STACK_DIRECTIVE
+

Modified: libunwind/branches/release_39/src/UnwindRegistersSave.S
URL: http://llvm.org/viewvc/llvm-project/libunwind/branches/release_39/src/UnwindRegistersSave.S?rev=278023&r1=278022&r2=278023&view=diff
==============================================================================
--- libunwind/branches/release_39/src/UnwindRegistersSave.S (original)
+++ libunwind/branches/release_39/src/UnwindRegistersSave.S Mon Aug  8 12:18:56 2016
@@ -464,3 +464,6 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext
   l.sw     120(r3), r30
   l.sw     124(r3), r31
 #endif
+
+NO_EXEC_STACK_DIRECTIVE
+

Modified: libunwind/branches/release_39/src/assembly.h
URL: http://llvm.org/viewvc/llvm-project/libunwind/branches/release_39/src/assembly.h?rev=278023&r1=278022&r2=278023&view=diff
==============================================================================
--- libunwind/branches/release_39/src/assembly.h (original)
+++ libunwind/branches/release_39/src/assembly.h Mon Aug  8 12:18:56 2016
@@ -35,19 +35,34 @@
 #define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name)
 
 #if defined(__APPLE__)
+
 #define SYMBOL_IS_FUNC(name)
+#define NO_EXEC_STACK_DIRECTIVE
+
 #elif defined(__ELF__)
+
 #if defined(__arm__)
 #define SYMBOL_IS_FUNC(name) .type name,%function
 #else
 #define SYMBOL_IS_FUNC(name) .type name, at function
 #endif
+
+#if defined(__GNU__) || defined(__ANDROID__) || defined(__FreeBSD__)
+#define NO_EXEC_STACK_DIRECTIVE .section .note.GNU-stack,"",%progbits
+#else
+#define NO_EXEC_STACK_DIRECTIVE
+#endif
+
 #else
+
 #define SYMBOL_IS_FUNC(name)                                                   \
   .def name SEPARATOR                                                          \
     .scl 2 SEPARATOR                                                           \
     .type 32 SEPARATOR                                                         \
   .endef
+
+#define NO_EXEC_STACK_DIRECTIVE
+
 #endif
 
 #define DEFINE_LIBUNWIND_FUNCTION(name)                   \




More information about the cfe-commits mailing list