Fixed visibility of non-globals in GAS output for COFF
authorMoritz Kroll <Moritz.Kroll@gmx.de>
Tue, 5 Aug 2008 00:34:50 +0000 (00:34 +0000)
committerMoritz Kroll <Moritz.Kroll@gmx.de>
Tue, 5 Aug 2008 00:34:50 +0000 (00:34 +0000)
[r20975]

ir/be/begnuas.c

index 6ff9698..f1b48f4 100644 (file)
@@ -171,7 +171,11 @@ void be_gas_emit_function_prolog(ir_entity *entity, unsigned alignment)
        case GAS_FLAVOUR_MINGW:
                be_emit_cstring("\t.def\t");
                be_emit_string(name);
-               be_emit_cstring(";\t.scl\t2;\t.type\t32;\t.endef\n");
+               if (get_entity_visibility(entity) == visibility_external_visible) {
+                       be_emit_cstring(";\t.scl\t2;\t.type\t32;\t.endef\n");
+               } else {
+                       be_emit_cstring(";\t.scl\t3;\t.type\t32;\t.endef\n");
+               }
                be_emit_write_line();
                break;
        case GAS_FLAVOUR_MACH_O: