public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/35038]  New: GCOV - using "--coverage" results in libgcov.a(_gcov.o) is referenced by DSO
@ 2008-01-31  6:17 nanda dot anni at wipro dot com
  2008-01-31  6:28 ` [Bug gcov-profile/35038] " nanda dot anni at wipro dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: nanda dot anni at wipro dot com @ 2008-01-31  6:17 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gcov-profile/35038] GCOV - using "--coverage" results in libgcov.a(_gcov.o) is referenced by DSO
  2008-01-31  6:17 [Bug gcov-profile/35038] New: GCOV - using "--coverage" results in libgcov.a(_gcov.o) is referenced by DSO nanda dot anni at wipro dot com
@ 2008-01-31  6:28 ` nanda dot anni at wipro dot com
  2008-01-31 10:55 ` rguenth at gcc dot gnu dot org
  2009-04-01 13:18 ` ramu dot konaparthi at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: nanda dot anni at wipro dot com @ 2008-01-31  6:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from nanda dot anni at wipro dot com  2008-01-31 04:47 -------
I am unable to proceed further to get the code coverage for my application
(product).
Hence it is critical to fix this issue.
I had posted a query to gcov maintainers but their response was that, there
might be a bug in gcc itself. Hence reported this bug.

-----Original Message-----
From: Peter Oberparleiter [mailto:oberparleiter@googlemail.com] 
Sent: Wednesday, January 30, 2008 9:50 PM
To: Nanda Annigeri
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] gcov - compilation error while using gcc 4.1.1

Hi,

Nanda Annigeri wrote:
> 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(_g
> co
> v.o) is referenced by DSO
>  
> I have tried using gcc 4.2.2 and also latest libtool but could not 
> resolve the issue.

Try using -fprofile-arcs as linker option instead of -lgcov. If that doesn't
help this is most likely a bug in gcc. Please report to the gcc maintainers.


Regards,
  Peter Oberparleiter


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35038


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gcov-profile/35038] GCOV - using "--coverage" results in libgcov.a(_gcov.o) is referenced by DSO
  2008-01-31  6:17 [Bug gcov-profile/35038] New: GCOV - using "--coverage" results in libgcov.a(_gcov.o) is referenced by DSO nanda dot anni at wipro dot com
  2008-01-31  6:28 ` [Bug gcov-profile/35038] " nanda dot anni at wipro dot com
@ 2008-01-31 10:55 ` rguenth at gcc dot gnu dot org
  2009-04-01 13:18 ` ramu dot konaparthi at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-31 10:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-01-31 10:39 -------
Coverage and shared libraries do not mix easily.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35038


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gcov-profile/35038] GCOV - using "--coverage" results in libgcov.a(_gcov.o) is referenced by DSO
  2008-01-31  6:17 [Bug gcov-profile/35038] New: GCOV - using "--coverage" results in libgcov.a(_gcov.o) is referenced by DSO nanda dot anni at wipro dot com
  2008-01-31  6:28 ` [Bug gcov-profile/35038] " nanda dot anni at wipro dot com
  2008-01-31 10:55 ` rguenth at gcc dot gnu dot org
@ 2009-04-01 13:18 ` ramu dot konaparthi at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ramu dot konaparthi at gmail dot com @ 2009-04-01 13:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ramu dot konaparthi at gmail dot com  2009-04-01 13:18 -------
I am able to built shared objects. But, while building the executable binary
using the shared objects. I see the error "hidden symbol `__gcov_init' in
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/libgcc.a(_gcov.oS) is referenced by
DSO".

Some one please help me.

======output snippet Begin ==================
/usr/bin/g++ -g -fPIC -o hpvgtst hpvgtstpgm.o -L../Tools/lib -lgatorapi
-lhpvgtst -L/vob/tdodbc_nt/driver_manager/data_direct/suselinux-x8664/lib
-lodbc -lodbcinst -lnsl -lresolv -lc -lddicu21
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld:
hpvgtst: hidden symbol `__gcov_init' in
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/libgcc.a(_gcov.oS) is referenced by
DSO
collect2: ld returned 1 exit status
make: *** [hpvgtst] Error 1
======output snippet End ==================

Regards,
  -Ramu


-- 

ramu dot konaparthi at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ramu dot konaparthi at gmail
                   |                            |dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35038


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-01 13:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-31  6:17 [Bug gcov-profile/35038] New: GCOV - using "--coverage" results in libgcov.a(_gcov.o) is referenced by DSO nanda dot anni at wipro dot com
2008-01-31  6:28 ` [Bug gcov-profile/35038] " nanda dot anni at wipro dot com
2008-01-31 10:55 ` rguenth at gcc dot gnu dot org
2009-04-01 13:18 ` ramu dot konaparthi at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).