But when I try to link them with –lgcov option, it gives the following error.
/usr/bin/ld: obj/Test_function: hidden symbol `__gcov_init' in /usr/lib/gcc/i486-linux-gnu/4.1.2/libgcov.a(_gcov.o) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
Gcc version is 4.1.2
I have shared libraries in my application and I tried using the flag fPIC for compiling these. This did not help meL