Trying to get gcov working on imx6 platform with linux.
When enabled with following options,
When compiled, .tmp_driver_name.gcno file will be created.
kernel zImage seems to be 14mb in size.
When loaded, system boots and corresponding .gcda and .gcno files are created under directory /sys/kernel/debug/gcov
Here actually spi-imx.gcno files got created at runtime is a softlink for .tmp_spi-imx.gcno(created actually during compilation time). So it requires kernel sources to be part of rootfs on the target file system, where device is running.
This status is on bootup. once test code for corresponding driver is executed, there is no update happening on the spi-imx.gcda file. Still the file seems to be empty.
Kernel been used is 4.15 kernel.
gcc version is 5.3.
Added changes related to latest stable kernel for gcov to support gcc version above 5. Since current code support only upto gcc version 4.7
Still .gcda files are empty. Could not get the code coverage data of the kernel.