OK, below is my latest attempt at getting this right.  It provides a weak
definition of __gcov_init for gcc's that don't generate it, while gcc's that
do will have their's override this one.

The patch is against -bk8.

                                Jeff

# Try to finally fix the __gcov_init thing corectly.
# This patch makes a weak definition of __gcov_init, which will be used if
# there is no other definition, and which will be overridden if there is a
# real definition.  Thus, if it is not used, then the weak definition will
# satisfy the EXPORT_SYMBOL, and if it is, then the real one will.
Index: linux-2.6.11/arch/um/kernel/gmon_syms.c
===================================================================
--- linux-2.6.11.orig/arch/um/kernel/gmon_syms.c        2005-03-12 
18:59:48.000000000 -0500
+++ linux-2.6.11/arch/um/kernel/gmon_syms.c     2005-03-12 22:44:31.000000000 
-0500
@@ -10,17 +10,13 @@
 extern void __gcov_init(void *);
 EXPORT_SYMBOL(__gcov_init);
 #else
+#endif
+
 extern void __bb_init_func(void *);
 EXPORT_SYMBOL(__bb_init_func);
-#endif
 
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
+void  __attribute__((weak)) __gcov_init(void *arg)
+{
+}
+
+EXPORT_SYMBOL(__gcov_init);



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to