------- Additional Comments From janis at gcc dot gnu dot org 2005-03-11 01:32 ------- The submitter's testcase works if function __gcov_init in libgcov.c is declared hidden. Probably all of the __gcov* symbols ought to be hidden; I'll work on a patch to hide that symbol and others that seem appropriate. Possible workaround: The linker's -E option exports all global symbols from the executable to the dynamic symbol table. A subset of global symbols can be exported by using -E along with --version-script to list symbols to export. Depending on how many symbols a shared object needs to access from a shared object, this might be a reasonable workaround. I consulted an expert, and unfortunatly there doesn't seem to be a way to say "export all symbols except this small list".
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19985