I've committed this patch so that libgcov ignores object with no functions.
Such objects can occur when it turns out that none of the instrumented functions
were emitted -- the translation unit ends up with just data objects.
nathan
2012-01-11 Nathan Sidwell <nat...@acm.org>
* libgcov.c (__gcov_init): Ignore objects with no functions.
Index: libgcov.c
===================================================================
--- libgcov.c (revision 183102)
+++ libgcov.c (working copy)
@@ -686,10 +686,14 @@ gcov_exit (void)
void
__gcov_init (struct gcov_info *info)
{
- if (!info->version)
+ if (!info->version || !info->n_functions)
return;
if (gcov_version (info, info->version, 0))
{