This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug gcov-profile/35038] New: GCOV - using "--coverage" results in libgcov.a(_gcov.o) is referenced by DSO
- From: "nanda dot anni at wipro dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jan 2008 04:43:23 -0000
- Subject: [Bug gcov-profile/35038] New: GCOV - using "--coverage" results in libgcov.a(_gcov.o) is referenced by DSO
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I am using gcc 4.1.1 on CentOS.
PerfStatsCli.o(.text+0x26a6): In function `global constructors keyed to
0_main':
/home/nanda/galaxy/tsunami/PerfStats/cli/PerfStatsCli.cpp:664: undefined
reference to `__gcov_init'
PerfStatsCli.o(.data.rel+0x48): undefined reference to `__gcov_merge_add'
collect2: ld returned 1 exit status
make: *** [perfstats] Error 1
Then I tried linking with -lgcov and now I get below error.
-L/home/nanda/galaxy/lib -lgcov -lPerfStats -L /usr/local/lib -lpthread -ldl
-dynamic
/usr/bin/ld: perfstats: hidden symbol `__gcov_init' in
/usr/local/gcc-411/lib/gcc/x86_64-unknown-linux-gnu/4.1.1/libgcov.a(_gcov.o) is
referenced by DSO
I have tried using gcc 4.2.2 and also latest libtool(1.5.24 )but could not
resolve the issue.
--
Summary: GCOV - using "--coverage" results in libgcov.a(_gcov.o)
is referenced by DSO
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nanda dot anni at wipro dot com
GCC build triplet: 64 bit system
GCC host triplet: Linux with 2.6 kernel
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35038