This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcj for ARM EABI: Use __cxa_end_cleanup


We need to call "__cxa_end_cleanup" when resuming after a cleanup.
This may seem odd, given that this is part of libstdc++ rather than
the language independent unwinder, but the personality routines call
__cxa_begin_cleanup, and these functions must be used in pairs.

Andrew.


Index: gcc/java/decl.c2007-08-14  Andrew Haley  <aph@all6500.kos.to>

        * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
        when using the ARM EABI.

===================================================================
--- gcc/java/decl.c     (revision 126985)
+++ gcc/java/decl.c     (working copy)
@@ -1077,7 +1077,10 @@
   eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
                                              ? "__gcj_personality_sj0"
                                              : "__gcj_personality_v0");
-  default_init_unwind_resume_libfunc ();
+  if (targetm.arm_eabi_unwinder)
+    unwind_resume_libfunc = init_one_libfunc ("__cxa_end_cleanup");
+  else
+    default_init_unwind_resume_libfunc ();
 
   lang_eh_runtime_type = do_nothing;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]