From: Matthias Braun Date: Wed, 10 Feb 2010 22:09:13 +0000 (+0000) Subject: put zero initialized entities into bss section (not just uninitialized ones); TLS... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=00c43cda7202a15a95096961b9301ca3181c3c0a;p=cparser put zero initialized entities into bss section (not just uninitialized ones); TLS entities should go to tbss or tdata [r27108] --- diff --git a/ast2firm.c b/ast2firm.c index af9f193..b3079cb 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -4562,8 +4562,12 @@ static void create_global_variable(entity_t *entity) panic("invalid storage class for global var"); } - ir_type *var_type = entity->variable.thread_local ? - get_tls_type() : get_glob_type(); + ir_type *var_type = get_glob_type(); + if (entity->variable.thread_local) { + var_type = get_tls_type(); + /* LINKAGE_MERGE not supported by current linkers */ + linkage &= ~IR_LINKAGE_MERGE; + } create_variable_entity(entity, DECLARATION_KIND_GLOBAL_VARIABLE, var_type); irentity = entity->variable.v.entity; add_entity_linkage(irentity, linkage);