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]

[patch libgcc]: Adjust cygming-crtbegin code to use weak


Hi,

this change is actual used by cygwin and is required for upcoming x64
cygwin target.

ChangeLog

2013-03-22  Kai Tietz  <ktietz@redhat.com>

	* config/i386/cygming-crtbegin.c (__register_frame_info): Make weak.
	(__deregister_frame_info): Likewise.

Tested for i686-pc-cygwin, and x86_64-pc-cygwin.  I will apply this
code tomorrow if there are no objections by other
Windows-target-maintainers.

Regards,
Kai

Index: libgcc/config/i386/cygming-crtbegin.c
===================================================================
--- libgcc/config/i386/cygming-crtbegin.c	(Revision 196898)
+++ libgcc/config/i386/cygming-crtbegin.c	(Arbeitskopie)
@@ -46,15 +46,33 @@ see the files COPYING3 and COPYING.RUNTIME respect
 #define LIBGCJ_SONAME "libgcj_s.dll"
 #endif

-
+#if DWARF2_UNWIND_INFO
 /* Make the declarations weak.  This is critical for
    _Jv_RegisterClasses because it lives in libgcj.a  */
-extern void __register_frame_info (const void *, struct object *)
+extern void __register_frame_info (__attribute__((unused)) const void *,
+				   __attribute__((unused)) struct object *)
 				   TARGET_ATTRIBUTE_WEAK;
-extern void *__deregister_frame_info (const void *)
+extern void *__deregister_frame_info (__attribute__((unused)) const void *)
 				      TARGET_ATTRIBUTE_WEAK;
-extern void _Jv_RegisterClasses (const void *) TARGET_ATTRIBUTE_WEAK;
+TARGET_ATTRIBUTE_WEAK void
+__register_frame_info (__attribute__((unused)) const void *p,
+		       __attribute__((unused)) struct object *o)
+{}

+TARGET_ATTRIBUTE_WEAK void *
+__deregister_frame_info (__attribute__((unused)) const void *p)
+{ return (void*) 0; }
+#endif /* DWARF2_UNWIND_INFO */
+
+#if TARGET_USE_JCR_SECTION
+extern void _Jv_RegisterClasses (__attribute__((unused)) const void *)
+  TARGET_ATTRIBUTE_WEAK;
+
+TARGET_ATTRIBUTE_WEAK void
+_Jv_RegisterClasses (__attribute__((unused)) const void *p)
+{}
+#endif /* TARGET_USE_JCR_SECTION */
+
 #if defined(HAVE_LD_RO_RW_SECTION_MIXING)
 # define EH_FRAME_SECTION_CONST const
 #else


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