This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcov unable to dump coverage of shared library


Opps ,

It seams that gcov has some issues to dump coverage of shared libraries.

I compiled using  following ....

gcc  -rdynamic -fPIC  -fprofile-arcs -ftest-coverage -c -o shared.o shared.c
ld -shared shared.o /usr/lib/gcc/x86_64-redhat-linux/4.1.1/libgcov.a
/usr/lib/x86_64-redhat-linux3E/lib64/libc.so -o shared.so

but no   shared.gcda  was generated for the shared.c
and got coverage information only for main binary only to which
shared.so was linked.

Can some one please suggest how to do code coverage for shared libraries.

regards
aditya


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]