From 8a8819d21d06637a86b69badb5c0f5590ca76ec1 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 12 Feb 2010 17:54:53 +0000 Subject: [PATCH] implement several new section types including comdat for ELF, this potentially breaks COFF and MACHO (will fix it asap) [r27136] --- ast2firm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ast2firm.c b/ast2firm.c index c47b8eb..f961a83 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -4326,7 +4326,8 @@ static void create_variable_initializer(entity_t *entity) ir_entity *irentity = entity->variable.v.entity; - if (tq & TYPE_QUALIFIER_CONST) { + if (tq & TYPE_QUALIFIER_CONST + && get_entity_owner(irentity) != get_tls_type()) { add_entity_linkage(irentity, IR_LINKAGE_CONSTANT); } set_atomic_ent_value(irentity, value); @@ -4431,8 +4432,7 @@ static void create_local_static_variable(entity_t *entity) size_t l = strlen(entity->base.symbol->string); char buf[l + sizeof(".%u")]; snprintf(buf, sizeof(buf), "%s.%%u", entity->base.symbol->string); - ident *const id = id_unique(buf); - + ident *const id = id_unique(buf); ir_entity *const irentity = new_d_entity(var_type, id, irtype, dbgi); if (type->base.qualifiers & TYPE_QUALIFIER_VOLATILE) { -- 2.20.1