This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, updated] Make emulated TLS lto-friendly.
On 8 Jul 2010, at 17:14, Richard Henderson wrote:
On 07/08/2010 01:42 AM, IainS wrote:
Huh? Why is DECL_COMMON not sufficient?
int foo (void)
static __thread int a;
places __emutls_v.a.1700 in .lcomm and therefore needs an
but the decl is not marked DECL_COMMON.
do you believe that indicates a bug elsewhere, or is it a reasonable
The purpose of __emutls_register_common is to merge COMMON block
as would normally be done in the linker. The variable A is not a
variable (as you note by DECL_COMMON not being set). No
You've simply been confused about .lcomm for zero-initialization of
control variable and true COMMON block variables.
I'm sure it's confusion on my part - but :
has size and align fields which cannot be 0.
so, either it should not be placed into .lcomm (I infer this is
probably the case from your response), or these fields must be
initialized by the emutls_register_common hook.