diff --git a/asmcomp/closure.ml b/asmcomp/closure.ml index 6914caad8..e0487da06 100644 --- a/asmcomp/closure.ml +++ b/asmcomp/closure.ml @@ -355,7 +355,7 @@ and close_functions fenv cenv fun_defs = (function (id, (Lfunction(kind, params, body) as def)) -> let label = - Compilenv.current_unit_name() ^ "_" ^ Ident.unique_name id in + Compilenv.current_unit_name() ^ "." ^ Ident.unique_name id in let arity = List.length params in let fundesc = {fun_label = label; diff --git a/asmcomp/emitaux.ml b/asmcomp/emitaux.ml index e35623a51..e23363f05 100644 --- a/asmcomp/emitaux.ml +++ b/asmcomp/emitaux.ml @@ -32,6 +32,8 @@ let emit_symbol esc s = match c with 'A'..'Z' | 'a'..'z' | '0'..'9' | '_' -> output_char !output_channel c + | '.' -> + output_char !output_channel '_' | _ -> Printf.fprintf !output_channel "%c%02x" esc (Char.code c) done