Unbreak emitting TLS variables in the binary ia32 emitter.
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 6 May 2012 06:02:10 +0000 (08:02 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 6 May 2012 06:02:53 +0000 (08:02 +0200)
ir/be/ia32/ia32_emitter.c

index 9449772..f85c402 100644 (file)
@@ -2093,7 +2093,7 @@ static void bemit_entity(ir_entity *entity, bool entity_sign, int offset,
        be_gas_emit_entity(entity);
 
        if (get_entity_owner(entity) == get_tls_type()) {
-               if (get_entity_visibility(entity) == ir_visibility_external) {
+               if (!entity_has_definition(entity)) {
                        be_emit_cstring("@INDNTPOFF");
                } else {
                        be_emit_cstring("@NTPOFF");