* unwind-dw2-fde.c (__deregister_frame_info): Stubbify in favour of...
(__deregister_frame_info_bases): New.
* unwind-dw2-fde.h: Declare it.
* libgcc-std.ver: Export it.
* crtstuff.c (__do_global_dtors_aux): Call it if we would have
called __register_frame_info_bases.
From-SVN: r42473
+2001-05-22 Richard Henderson <rth@redhat.com>
+
+ * unwind-dw2-fde.c (__deregister_frame_info): Stubbify in favour of...
+ (__deregister_frame_info_bases): New.
+ * unwind-dw2-fde.h: Declare it.
+ * libgcc-std.ver: Export it.
+ * crtstuff.c (__do_global_dtors_aux): Call it if we would have
+ called __register_frame_info_bases.
+
2001-05-22 Loren J. Rittle <ljrittle@acm.org>
* config/freebsd.h (FBSD_CPP_PREDEFINES): Use #endif/#if pair
TARGET_ATTRIBUTE_WEAK;
extern void *__deregister_frame_info (void *)
TARGET_ATTRIBUTE_WEAK;
+extern void *__deregister_frame_info_bases (void *)
+ TARGET_ATTRIBUTE_WEAK;
#ifndef OBJECT_FORMAT_MACHO
}
#ifdef EH_FRAME_SECTION_ASM_OP
+#if defined(CRT_GET_RFIB_TEXT) || defined(CRT_GET_RFIB_DATA)
+ /* If we used the new __register_frame_info_bases interface,
+ make sure that we deregister from the same place. */
+ if (__deregister_frame_info_bases)
+ __deregister_frame_info_bases (__EH_FRAME_BEGIN__);
+#else
if (__deregister_frame_info)
__deregister_frame_info (__EH_FRAME_BEGIN__);
#endif
+#endif
+
completed = 1;
}
_Unwind_SetIP
__deregister_frame
__deregister_frame_info
+ __deregister_frame_info_bases
__register_frame
__register_frame_info
__register_frame_info_bases
}
/* Called from crtbegin.o to deregister the unwind info for an object. */
+/* ??? Glibc has for a while now exported __register_frame_info and
+ __deregister_frame_info. If we call __register_frame_info_bases
+ from crtbegin (wherein it is declared weak), and this object does
+ not get pulled from libgcc.a for other reasons, then the
+ invocation of __deregister_frame_info will be resolved from glibc.
+ Since the registration did not happen there, we'll abort.
+
+ Therefore, declare a new deregistration entry point that does the
+ exact same thing, but will resolve to the same library as
+ implements __register_frame_info_bases. */
void *
-__deregister_frame_info (void *begin)
+__deregister_frame_info_bases (void *begin)
{
struct object **p;
struct object *ob = 0;
return (void *) ob;
}
+#ifdef ASM_OUTPUT_DEF
+void *
+__deregister_frame_info (void *)
+ __attribute__((alias(__USER_LABEL_PREFIX__ "__deregister_frame_info_bases")));
+#else
+void *
+__deregister_frame_info (void *begin)
+{
+ return __deregister_frame_info_bases (begin);
+}
+#endif
+
void
__deregister_frame (void *begin)
{
extern void __register_frame_info_table (void *, struct object *);
extern void __register_frame_table (void *);
extern void *__deregister_frame_info (void *);
+extern void *__deregister_frame_info_bases (void *);
extern void __deregister_frame (void *);
\f