[runtime] Fix DISABLE_REFLECTION_EMIT build.
[mono.git] / mono / utils / mono-signal-handler.h
index 9e0b072a1a5e7b6659f2c9f8f83a3e0618a6db6d..4842cb8f72bb41bf5274c6fdac634bfd9832afa9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-signal-handler.h: Handle signal handler differences across platforms
+/**
+ * \file
+ * Handle signal handler differences across platforms
  *
  * Copyright (C) 2013 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
 #ifdef KRAIT_IT_BUG_WORKAROUND
 #define MONO_SIGNAL_HANDLER_FUNC(access, name, arglist)                \
        static void __krait_ ## name arglist;   \
-       __attribute__ ((naked)) access void                             \
+       __attribute__ ((__naked__)) access void                         \
        name arglist                                                    \
        {                                                               \
                asm volatile (                                          \
                              "mov r0, r0\n\t"                          \
                              "mov r0, r0\n\t"                          \
                              "mov r0, r0\n\t"                          \
-                             "mov r0, r0\n\t");                        \
-               asm volatile (                                          \
-                             "bx %0"                                   \
-                             : : "r" (__krait_ ## name));              \
+                             "mov r0, r0\n\t"                          \
+                                 "b __krait_" # name                   \
+                                 "\n\t");                                              \
        }       \
-       static void __krait_ ## name arglist
+       static __attribute__ ((__used__)) void __krait_ ## name arglist
 #endif
 
-
 /* Don't use this */
 #ifndef MONO_SIGNAL_HANDLER_FUNC
 #define MONO_SIGNAL_HANDLER_FUNC(access, name, arglist) access void name arglist