Hi Forks,
I tried to use gcov tool for a coverage test of my kernel module, but it
didn't work.
My environment is follows...
kernel : 2.6.31.12
arch : ARM Cortex-A8
board : beagleboard
tool : CodeSourcery 2009q1-203
mount : file system on SD card
My attempt process is follows...
1. make directory for kernel source/object on x86 build machine ->
/tmp/linux
2. make directory for my kernel module on x86 build machine ->
/tmp/linux/arch/arm/mach-omap2/module
3. enable DEBUG_FS and GCOV_KERNEL config
4. add "GCOV_PROFILE_mydriver.o := y" to MAKEFILE of my kernel module
5. Build kernel and kernel module on x86 build machine(I found a gcno file
in the my module directory)
6. copy all files under /tmp/linux to the exact same file system location on
the SD card
7. copy /tmp/linux/arch/arm/boot/uImage to the SD card
8. boot beableboard with the SD card
9. run "mount -t debugfs none /sys/kernel/debugfs" to mount debugfs
10.
my module is lodable case ->
When I ran "insmod mymodule.ko", I got below error.
mymodule: unknown relocation: 38
insmod: can't insert 'mymodule.ko': invalid module format
my module is staticary linked case ->
My module was successfully loaded at bootup time, but I didn't get a gcda
file
Does My environment or process have problem?
Is there anyone who put gcov tool to work correctly on ARM machine?
Would you give me some advice?
thank you,