[aot] Fix emission of symbol sizes which got broken by 05cd4225b2f693b8a3a38ecd1caf32...
[mono.git] / mono / mini / aot-compiler.c
index cd156ce0ba68f24ed4ffaf09cd8d3a569e7df83a..9ddb629d3c39a8f016e217238ea35eb1487be1e2 100644 (file)
@@ -5035,7 +5035,10 @@ emit_method_code (MonoAotCompile *acfg, MonoCompile *cfg)
        emit_line (acfg);
 
        if (acfg->aot_opts.write_symbols) {
-               emit_symbol_size (acfg, debug_sym, ".");
+               if (debug_sym)
+                       emit_symbol_size (acfg, debug_sym, ".");
+               else
+                       emit_symbol_size (acfg, cfg->asm_symbol, ".");
                g_free (debug_sym);
        }