bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/14342] [gold] symbol 'std::__once_callable' used as both __thr


From: hubicka at gcc dot gnu.org
Subject: [Bug gold/14342] [gold] symbol 'std::__once_callable' used as both __thread and non-__thread
Date: Sat, 10 Aug 2013 09:33:47 +0000

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   
address@hidden(%rip), %r12
crossmodule-indircall-1a.s:     movq   
address@hidden(%rip), %rax

LTO uses:

ccsUXr3s.ltrans0.s:     movq    address@hidden(%rip),
%rbp

and libgcc definition is:

        leaq    address@hidden(%rip), %rdi
        .globl  __gcov_indirect_call_callee
        .type   __gcov_indirect_call_callee, @object
        .size   __gcov_indirect_call_callee, 8
__gcov_indirect_call_callee:
        .long   address@hidden, 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]