------- Comment #2 from gary at intrepid dot com 2006-06-23 16:44 -------
I agree this is definitely an enhancement, but will note the following:
1. On Fedora Core 5, x86_64, I was able to successfully link and run
a null program (written in assembly) that initializes thread local
'ptr' that points to thread local 'data'. The declarations appear
as follows:
.globl data
.section .tbss,"awT",@nobits
.align 8
.type data, @object
.size data, 8
data:
.zero 8
.globl ptr
.align 8
.type ptr, @object
.size ptr, 8
ptr:
.quad data
I didn't run extensive tests to verify this was doing the right thing, but
there were no complaints from the linker.
2. Given that __thread is an extension, we could choose to interpret
"constancy", as "constant from the perspective of the currently executing
thread" without doing much harm to "C" semantics.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28141