This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
gcov unable to dump coverage of shared library
- From: "aditya tiwari" <tiwari dot aditya13 at gmail dot com>
- To: binutils at sourceware dot org
- Date: Fri, 23 May 2008 17:11:48 +0530
- Subject: 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