https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83879
--- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
The multiple definitions of gcov_master should not be a problem. The (ELF)
semantics of shared libraries are such that the definition in the main program
preempts the defiitions in the libraries. The libraries' GOT entry for that
symbol should point at the main program's instance. That's the design intent,
IIRC.
It looks like the shared objects are built with PIC libgcov:
0000000000000000 <__gcov_dump_int>:
0: 48 8b 05 00 00 00 00 mov 0x0(%rip),%rax # 7
<__gcov_dump_int+0x7>
3: R_X86_64_REX_GOTPCRELX __gcov_master-0x4
7: 53 push %rbx
8: 48 8d 1d 00 00 00 00 lea 0x0(%rip),%rbx # f
<__gcov_dump_int+0xf>
b: R_X86_64_PC32 __gcov_root-0x4
f: 81 38 52 32 37 41 cmpl $0x41373252,(%rax)
So I presume that during loading the shared objects, they're not linking
themselves into the gcov list.