gcov instrumented shared object referencing __gcov_init hidden symbol

I have a main linux executable and that executable is using some functions from a dynamic shared object. When I instrument the shared object and try also to instrument and compile the main executable it gives me a error like in bellow.

hidden symbol: __gcov_init in /usr/lib/gcc/x86_64-linux-gnu/4.8/libgcov/libgcov.a(_gcov.o) is referenced by DSO.

My question is,

[1] Is this happen exactly due to the shared library is referencing back to main executable ? or static object libgcov.a ?

[2] How can I overcome this issue ? In windows there is no way that shared object reference back to main executable, but in linux this is happening.

Source: gcc

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.