put zero initialized entities into bss section (not just uninitialized ones); TLS...
authorMatthias Braun <matze@braunis.de>
Wed, 10 Feb 2010 22:09:13 +0000 (22:09 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 10 Feb 2010 22:09:13 +0000 (22:09 +0000)
[r27108]

ast2firm.c

index af9f193..b3079cb 100644 (file)
@@ -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);