https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104685

            Bug ID: 104685
           Summary: multiple common of `__gcov_var'
           Product: gcc
           Version: 8.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gejoed at rediffmail dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

In the code that I work on, in my organization the gcov build was successfully
done with shared libs using the --coverage flags. 
However, the -Wl,--warn-common option was enabled and also the
-Wl,--fatal-warnings during the linking stage.

The multiple symbol common warning appeared as follows :
<initial path of ld truncated here>/xxx-linux/8.2.0/real-ld: libxxxx.so and
<path truncated>/xxx-linux/8.2.0/libgcov.a(_gcov.o): warning: multiple common
of `__gcov_var'

If I remove the --fatal-warning flag, the warning appears and build succeeds.

I also tried adding -Wl,--allow-multiple-definition (with --warn-common and
--fatal-warnings present) but that didn't resolve the build failure.

I went through ld options available and couldn't find out any solution here.
Is the only solution - to turn of --warn-common option or --fatal-warning
option ?

Since I couldn't make a local working example myself, please bear with my query
having just one line statement of the warning above (due to info sec
limitations).

Let me know if you would be able to help here.

Thanks

Reply via email to