From: Leann O. <oga...@os...> - 2006-05-16 17:13:00
|
On Tue, 2006-05-16 at 07:59 -0500, Paul Larson wrote: > > Forwarding this to the proper list > > --- > Paul Larson > Linux Technology Center > IBM Corporation > ph: (512) 838-9303 tl: 678-9303 > pl...@us... > ----- Forwarded by Paul Larson/Austin/IBM on 05/16/2006 07:56 AM > ----- > > ltp...@li... wrote on 05/12/2006 01:50:03 > PM: > > > I cannot compile the 2.6.9 or 2.6.11 kernel with the gcov patch. > Both > > say that modversions.h is missing. > > > > CC drivers/gcov/gcov-proc.o > > /usr/src/kernels/linux-2.6.11/drivers/gcov/gcov-proc.c:31:31: > > linux/modversions.h: No such file or directory > > make[2]: *** [drivers/gcov/gcov-proc.o] Error 1 > > make[1]: *** [drivers/gcov] Error 2 > > make: *** [drivers] Error 2 > > > > I don't do the kernel much and I just know enough to get into > trouble so > > forgive me if I say something completely idiotic. > > > > On the 2.6.9, I can comment out the include for modversions.h and it > > will compile but I will not the gcov files in /proc/gcov. They > > directory structure is there and there are a number of .tmp_... > Files. > > > > I can also point it to the other modversions.h that is located in > > include/config/modversions.h which allows me to compile as well but > I > > receive a number of warnings > > > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/microcode.ko needs > > unknown symbol __gcov_init > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/microcode.ko needs > > unknown symbol __gcov_merge_add > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k8 > > .ko needs unknown symbol __gcov_init > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k8 > > .ko needs unknown symbol __gcov_merge_add > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-s > > mi.ko needs unknown symbol __gcov_init > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/cpu/cpufreq/speedstep-s > > mi.ko needs unknown symbol __gcov_merge_add > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/cpu/cpufreq/p4-clockmod > > .ko needs unknown symbol __gcov_init > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/cpu/cpufreq/p4-clockmod > > .ko needs unknown symbol __gcov_merge_add > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k6 > > .ko needs unknown symbol __gcov_init > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/cpu/cpufreq/powernow-k6 > > .ko needs unknown symbol __gcov_merge_add > > WARNING: /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/msr.ko > > needs unknown symbol __gcov_init > > WARNING: /lib/modules/2.6.11-gcov/kernel/arch/i386/kernel/msr.ko > > needs unknown symbol __gcov_merge_add > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/crypto/aes-i586.ko needs > > unknown symbol __gcov_init > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/crypto/aes-i586.ko needs > > unknown symbol __gcov_merge_add > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/oprofile/oprofile.ko needs > > unknown symbol __gcov_init > > WARNING: > > /lib/modules/2.6.11-gcov/kernel/arch/i386/oprofile/oprofile.ko needs > > unknown symbol __gcov_merge_add > > > > > > Any suggestions? Hi Jason, Just a few days ago I tried the linux-2.6.14-gcov.patch against the 2.6.14 kernel and ran into similar problems. I had to edit some Makefiles to get rid of those warnings. I can kind of replicate your warnings now by commenting out the "CFLAGS := $(CFLAGS_NOGCOV)" line in my arch/i386/boot/compressed/Makefile arch/i386/boot/compressed/misc.o: In function `global constructors keyed to stack_start_GCOV': misc.c:(.text+0x3a5f): undefined reference to `__gcov_init' arch/i386/boot/compressed/misc.o:(.data+0x184): undefined reference to `__gcov_merge_add' To get rid of those warnings you are seeing, maybe try adding the following line to the appropriate Makefiles where you are seeing those warnings pop up: CFLAGS := $(CFLAGS_NOGCOV) After I had originally patched all the Makefiles to get rid of the warnings like you are seeing, I eventually wound up updating my version of gcc. I updated to gcc-3.4.5. I was running gcc-3.3.x and it didn't seem to like that. It appeared that ctors_start and ctors_end were not getting set in kernel/module.c and as such my /proc/gcov directory would never get populated. Updating gcc seemed to fix that. Once I did update my gcc, I unpacked a new 2.6.14 kernel and applied the linux-2.6.14-gcov patch. When I compiled this time, I had no warnings at all and I never had to edit any Makefiles. Hope that helps, Leann |