[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Processed: Re: hidden symbol `__gcov_init' is referenced by DSO


I am trying to use gcov for collecting code coverage metrics.
I compiled the files with –fprofile-arcs –ftest-coverage option.

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        

Any pointers to solutions would be really helpful
Lakshmy B.Nair

Reply to: