What’s happening here is the uncompressed boot image, created when you compile a compressed kernel, is being GCOV’d by the compiler.  However, at this phase the executable does not link with gcov-core.c -- or any other part of the ‘real’ kernel -- where it would pickup __bb_init_func, hence the errors.  Peter's solution will prevent the complier from inserting the GCOV directives.



ltp-coverage-admin@lists.sourceforge.net wrote on 04/15/2005 08:25:01 AM:

> Christian Gagneraud wrote:
> > I should be interesting to get arm support in the official lcov patch,
> > i've made this "port" on our tree, but i don't know if these
> > modifications are clean nor if they are sufficient (seems to be not)...
> >
> > Are the lcov maintainers interesting in that?
>
> Support for new architectures is always welcome. Debugging support for
> those platforms is limited though as not all of us have access to the
> required hardware.
>
>
> As to the problem of the original poster:
>
> >> Here is the error iam getting .
> >> arch/arm/boot/compressed/misc.o(.text+0x5f00): In function `$a':
> >> : undefined reference to `__bb_init_func'   ( This function exists in
> >> the gcov coverage patch )
> >> make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
> >> make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
> >> make: *** [zImage] Error 2
>
> While I don't completely understand the source of the problem, I
> noticed, that i386 has an extra directive in their
> boot/compressed/Makefile to exclude files below this directory from GCOV
> profiling. This may be related to your problem. Please try the following:
>
> Go to the file arch/arm/boot/compressed/Makefile and add the following
> line anywhere near the line containing an EXTRA_CFLAGS statement:
>
> CFLAGS := $(CFLAGS_NOGCOV)
>
> This way, misc.o should not contain a reference to __bb_init_func and
> linking should succeed.
>
>
> Regards,
>    Peter Oberparleiter
>
>
> -------------------------------------------------------
> 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
> _______________________________________________
> Ltp-coverage mailing list
> Ltp-coverage@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-coverage