http://sourceware.org/bugzilla/show_bug.cgi?id=14342
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org Severity|normal |critical --- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> --- This problem now reprduce with mainline GCC indirect call profiling test gcc.dg/tree-prof/crossmodule-indircall-1.c: evans:/abuild/jh/trunk-3/build-inst11-check/gcc/:[2]# ./xgcc -B ./ -O3 -flto -fprofile-generate ../../gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1*.c --save-temps /abuild/jh/trunk-install/x86_64-unknown-linux-gnu/bin/ld: crossmodule-indircall-1.o: previous definition here /abuild/jh/trunk-install/x86_64-unknown-linux-gnu/bin/ld: error: ./libgcov.a(_gcov_indirect_call_profiler.o): symbol '__gcov_indirect_call_callee' used as both __thread and non-__thread /abuild/jh/trunk-install/x86_64-unknown-linux-gnu/bin/ld: crossmodule-indircall-1.o: previous definition here while it links just fine with GNU-ld or with gold and -fno-lto. The symbol is used as TLS symbol. non-LTO uses: crossmodule-indircall-1.s: movq __gcov_indirect_call_callee@gottpoff(%rip), %r12 crossmodule-indircall-1a.s: movq __gcov_indirect_call_callee@gottpoff(%rip), %rax LTO uses: ccsUXr3s.ltrans0.s: movq __gcov_indirect_call_callee@gottpoff(%rip), %rbp and libgcc definition is: leaq __gcov_indirect_call_callee@tlsgd(%rip), %rdi .globl __gcov_indirect_call_callee .type __gcov_indirect_call_callee, @object .size __gcov_indirect_call_callee, 8 __gcov_indirect_call_callee: .long __gcov_indirect_call_callee@dtpoff, 0 .string "__gcov_indirect_call_callee" I am not an expert on TLS, but it seems all right to me, since all goes through tls and gottpoff or dtpoff. I am not really happy about leaving -fprofile-generate broken with -flto on mainline. Is there a workaround? I really need this TLS variable... -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils