This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
undefined reference to _gcov_init
- From: qiongc at cse dot unsw dot edu dot au (Qiong Cai)
- To: gcc at gcc dot gnu dot org
- Date: Sat, 19 Apr 2003 14:58:28 +1000
- Subject: undefined reference to _gcov_init
Hi,
I downloaded the cvs and compiled the gcc with the
configuration:
% ~/gcc-3-4-cvs/bin/gcc -v
Reading specs from /export/qin/1/qiongc/gcc-3-4-cvs/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure --prefix=/import/qin/1/qiongc/gcc-3-4-cvs --enable-languages=c,c++,f77 --disable-libgcj : (reconfigured)
Thread model: posix
gcc version 3.4 20030417 (experimental)
I compiled some program with -fprofile-arcs, but it
failed when linking the object files together:
% make
/import/qin/1/qiongc/gcc-3-4-cvs/bin/gcc -O2 -fprofile-arcs -I/import/qin/1/qiongc/gcc-3-4-cvs/include -I../utils -c LUFactSizeA.c
/import/qin/1/qiongc/gcc-3-4-cvs/bin/gcc -O2 -fprofile-arcs -I/import/qin/1/qiongc/gcc-3-4-cvs/include -I../utils -c LUFact.c
/import/qin/1/qiongc/gcc-3-4-cvs/bin/gcc -o LUFactBenchSizeA LUFactSizeA.o LUFact.o -L/import/qin/1/qiongc/gcc-3-4-cvs/lib -lm -L../utils -lgetclock
LUFactSizeA.o(.text+0x5e): In function `_GLOBAL__I_main_GCOV':
: undefined reference to `__gcov_init'
LUFact.o(.text+0x197e): In function `_GLOBAL__I_datasizes_GCOV':
: undefined reference to `__gcov_init'
../utils/libgetclock.a(getclock.o)(.text+0x6d): In function `_GLOBAL__I_getclock_GCOV':
: undefined reference to `__gcov_init'
../utils/libgetclock.a(gtod.o)(.text+0xb0): In function `_GLOBAL__I_starttime_GCOV':
: undefined reference to `__gcov_init'
collect2: ld returned 1 exit status
Could anyone please tell me how to fix the problem? Is something
wrong with my ld (GNU ld version 2.13.90.0.10 20021010 Debian GNU/Linux)?
Thanks.
Qiong