about summary refs log tree commit diff
path: root/sysdeps/gnu
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2015-01-05 14:01:49 -0800
committerRoland McGrath <roland@hack.frob.com>2015-01-05 15:42:16 -0800
commit46abb64d6287d09100b147d062f6810066389b7e (patch)
tree9102447cb3ce0baaf29cb4041d8bb915f1185225 /sysdeps/gnu
parent61695fb2bab724ed69057c3eff03253708f96517 (diff)
downloadglibc-46abb64d6287d09100b147d062f6810066389b7e.tar.gz
glibc-46abb64d6287d09100b147d062f6810066389b7e.tar.xz
glibc-46abb64d6287d09100b147d062f6810066389b7e.zip
ARM: Consolidate with generic unwinder wrapper code
Diffstat (limited to 'sysdeps/gnu')
-rw-r--r--sysdeps/gnu/unwind-resume.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/sysdeps/gnu/unwind-resume.c b/sysdeps/gnu/unwind-resume.c
index 3f8b1def8f..267949e3a3 100644
--- a/sysdeps/gnu/unwind-resume.c
+++ b/sysdeps/gnu/unwind-resume.c
@@ -21,15 +21,16 @@
 #include <unwind.h>
 #include <gnu/lib-names.h>
 #include <sysdep.h>
+#include <unwind-resume.h>
 
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
-  __attribute__ ((noreturn));
-static _Unwind_Reason_Code (*libgcc_s_personality)
-  (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *,
-   struct _Unwind_Context *);
 
-static void
-init (void)
+void (*__libgcc_s_resume) (struct _Unwind_Exception *exc)
+  attribute_hidden __attribute__ ((noreturn));
+
+static _Unwind_Reason_Code (*libgcc_s_personality) PERSONALITY_PROTO;
+
+void attribute_hidden __attribute__ ((cold))
+__libgcc_s_init (void)
 {
   void *resume, *personality;
   void *handle;
@@ -43,33 +44,31 @@ init (void)
                   " must be installed for pthread_cancel to work\n");
 
   PTR_MANGLE (resume);
-  libgcc_s_resume = resume;
+  __libgcc_s_resume = resume;
   PTR_MANGLE (personality);
   libgcc_s_personality = personality;
 }
 
+#if !HAVE_ARCH_UNWIND_RESUME
 void
 _Unwind_Resume (struct _Unwind_Exception *exc)
 {
-  if (__glibc_unlikely (libgcc_s_resume == NULL))
-    init ();
+  if (__glibc_unlikely (__libgcc_s_resume == NULL))
+    __libgcc_s_init ();
 
-  __typeof (libgcc_s_resume) resume = libgcc_s_resume;
+  __typeof (__libgcc_s_resume) resume = __libgcc_s_resume;
   PTR_DEMANGLE (resume);
   (*resume) (exc);
 }
+#endif
 
 _Unwind_Reason_Code
-__gcc_personality_v0 (int version, _Unwind_Action actions,
-		      _Unwind_Exception_Class exception_class,
-                      struct _Unwind_Exception *ue_header,
-                      struct _Unwind_Context *context)
+__gcc_personality_v0 PERSONALITY_PROTO
 {
   if (__glibc_unlikely (libgcc_s_personality == NULL))
-    init ();
+    __libgcc_s_init ();
 
   __typeof (libgcc_s_personality) personality = libgcc_s_personality;
   PTR_DEMANGLE (personality);
-
-  return (*personality) (version, actions, exception_class, ue_header, context);
+  return (*personality) PERSONALITY_ARGS;
 }