Bug 39609 - hidden symbol `__gcov_init' in /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/libgcc.a(_gcov.oS) is referenced by DSO
Summary: hidden symbol `__gcov_init' in /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/lib...
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: gcov-profile (show other bugs)
Version: 3.3.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-01 13:44 UTC by Ramu
Modified: 2016-08-09 12:25 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ramu 2009-04-01 13:44:56 UTC
Problem:
g++ fail to build execuable by linking .so files built with options -Wall -fprofile-arcs -ftest-coverage

I am able to built shared objects with g++ using options -Wall -fprofile-arcs -ftest-coverage. But, while building the executable binary
by linkng 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".

I dont see the same problem for .c files building with gcc and same options.
Some one please help me. Please let know if you need any more info.

======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 ==================

gcc Version used:
===================
gcc --version
gcc (GCC) 3.3.3 (SuSE Linux)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
===================
Regards,
  -Ramu
Comment 1 Andrew Pinski 2009-04-22 23:34:45 UTC
How is the libraries build?  While linking do you use -fprofile-arcs -ftest-coverage?
Comment 2 Ramu 2009-04-23 07:53:29 UTC
(In reply to comment #1)
> How is the libraries build?  While linking do you use -fprofile-arcs
> -ftest-coverage?
> 

Hello,

Thanks for your response.

Used options "-Wall -fprofile-arcs -ftest-coverage"  for compilation. I see the error reported.
After your reply, I have tried using both the mentioned flags both in compilation and linking. But, still I see the same error.

BTW, I think these are complilation flags not the linking flags Am I not right ?

Regards,
  - Ramu
Comment 3 Martin Liška 2016-08-09 12:25:08 UTC
Guessing you're missing LDFLAGS="-Wall -fprofile-arcs -ftest-coverage".
Thus closing the bug as invalid.