linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] Fixing the __gcov_init problem
@ 2005-03-13  6:53 Jeff Dike
  2005-03-14 19:16 ` Blaisorblade
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Dike @ 2005-03-13  6:53 UTC (permalink / raw)
  To: Blaisorblade, Adrian Bunk; +Cc: user-mode-linux-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-03-14 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-13  6:53 [uml-devel] Fixing the __gcov_init problem Jeff Dike
2005-03-14 19:16 ` Blaisorblade
2005-03-14 22:19   ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox