bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/20805] gcc's ThreadSanitizer broken by gold


From: ccoutant at gmail dot com
Subject: [Bug gold/20805] gcc's ThreadSanitizer broken by gold
Date: Tue, 15 Nov 2016 17:39:58 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=20805

--- Comment #5 from Cary Coutant <ccoutant at gmail dot com> ---
> Gold does not optimize any TLS references when building a shared library.
> 
> In this case, where cur_thread_placeholder has hidden visibility, I think we
> should be able to optimize it down to IE, as ld.bfd does.

I take that back. We can't convert the GD model to IE unless we know that the
shared library we're building will never be dlopen'ed, and there's no current
way to tell the linker that.

If you want the IE model, it needs to be compiled that way. Apparently, you
were actually trying to do that, but the attribute didn't have the desired
effect (perhaps because the inliner didn't propagate the tls model to the outer
function), and you lucked out because ld.bfd went ahead and made the
optimization anyway. I'm not sure why it did that, but I don't think it should
have.

-- 
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]